javascript设置一个页面启动时 没有工具栏 地址栏等
if(window.name == "TT") return;
else
{
openOneWindow5Toolbar("Login.aspx", "TT", h, w, 1024, 677);
window.opener = null;
self.close();
}
function openOneWindow5Toolbar(url, target, top, left, width, height)
{
var feature = "location=no,menubar=no,resizable=yes,scrollbars=yes,status=yes,titlebar=no,toolbar=no,directories=no";
feature = feature + "top=" + top + ",left=" + left + ",width=" + width + ",height=" + height;
window.open(url, target, feature);
}
if(window.name == "TT") return;
else
{
openOneWindow5Toolbar("Login.aspx", "TT", h, w, 1024, 677);
window.opener = null;
self.close();
}
function openOneWindow5Toolbar(url, target, top, left, width, height)
{
var feature = "location=no,menubar=no,resizable=yes,scrollbars=yes,status=yes,titlebar=no,toolbar=no,directories=no";
feature = feature + "top=" + top + ",left=" + left + ",width=" + width + ",height=" + height;
window.open(url, target, feature);
}
else
{
openOneWindow5Toolbar("Login.aspx", "TT", h, w, 1024, 677);
window.opener = null;
self.close();
}
function openOneWindow5Toolbar(url, target, top, left, width, height)
{
var feature = "location=no,menubar=no,resizable=yes,scrollbars=yes,status=yes,titlebar=no,toolbar=no,directories=no";
feature = feature + "top=" + top + ",left=" + left + ",width=" + width + ",height=" + height;
window.open(url, target, feature);
}
javascript打开一个页面 然后然页面居中显示
var url = htmUrl;
var top = (screen.availHeight - h)/2;
var left = (screen.availWidth - w)/2;
var p = "scrollbars=0,status=0,menubar=0,resizable=2,location=0";
var params = "top=" + atop + ",left=" + aleft + ",width=" + awidth + ",height=" + aheight + "," + p ;
win = window.open(url,'SampleName',params);
win.focus();
var top = (screen.availHeight - h)/2;
var left = (screen.availWidth - w)/2;
var p = "scrollbars=0,status=0,menubar=0,resizable=2,location=0";
var params = "top=" + atop + ",left=" + aleft + ",width=" + awidth + ",height=" + aheight + "," + p ;
win = window.open(url,'SampleName',params);
win.focus();