嘗試此開放最大化和刪除選項來鎖定用戶與您的內部網站搞亂。你可以玩弄限制,以適應你的要求。
function openFullscreen(url)
{
// get the height correction for IE and set the window height and width
var height = screen.availHeight;
var width = screen.availWidth;
var fullscreen = (document.all) ? "no" : "yes";
var resizable = "no";
var toolbar = "no";
var status = "no";
var left = 0;
var top = 0;
//set window properties
props = "toolbar=no" +
",fullscreen=" + fullscreen +
",status=no" +
",resizable=no" +
",scrollbars=no" +
",menubar=no" +
",location=no" + ",";
dims = "width="+ width +
",height="+ height +
",left="+ left +
",top=" + top;
var win = window.open("", name, props + dims);
win.resizeTo(width, height);
win.location.href = url;
win.focus();
}
這似乎在我的機器上導致了不同的問題。任務欄沒有被覆蓋,但窗口的一部分是(即它位於任務欄的後面)。 是否可以打開一個「適當的」最大化窗口?即你不能從工具欄拖動它或調整它的大小,它會顯示還原按鈕而不是最大化的按鈕? – Loftx 2009-08-24 09:50:29
嘗試使用screen.availWidth和screen.availHeight,而不是screen.width和screen.height。 據我所知,沒有辦法打開一個正確最大化的窗口,只有一個佔據整個屏幕。 – sakabako 2009-11-15 20:28:43