window.open()方法中,窗口控制參數的詳細定義:
alwaysLowered innerWidth screenY
alwaysRaised left scrollbars
channelmode location status
dependent menubar titlebar
directories outerWidth toolbar
fullscreen outerHeight top
height menubar width
hotkeys resizable z-lock
innerHeight screenX
alwaysLowered
Internet Explorer:不支持
Navigator:版本 4+
指定窗口總是保留在堆棧的最下面。換言之,不管新窗口是否激活,總是其他窗口下。
window.open("alwayslowered.html", "_blank", "alwaysLowered");
alwaysRaised
Internet Explorer:不支持
Navigator:版本 4+
指定窗口總是保留在堆棧的最上面。換言之,不管新窗口是否激活,總是其他窗口上。
window.open("alwaysraised.html", "_blank", "alwaysRaised");
channelmode
Internet Explorer:版本 4+
Navigator:不支持
指定是否按照劇場模式顯示窗口,以及是否顯示頻道區。
window.open("channelmode.html", "_blank", "channelmode");
dependent
Internet Explorer:不支持
Navigator:版本 4+
定義是否窗口成為當前打開窗口的依賴子窗口。依賴窗口就是當它的父窗口關閉時,它也隨即關閉。在windows平臺上,一個依賴窗口不會在任務欄上顯示。
window.open("dependent.html", "_blank", "dependent");
directories
Internet Explorer:所有版本
Navigator:所有版本
指定是否顯示目錄按鈕(比如眾所周知的"What's Cool" and "What's New" 按鈕)。Internet Explorer將這些目錄按鈕引用為鏈接工具欄,Navigator(版本4和以上)稱之為個人工具欄。
window.open("directories.html", "_blank", "directories");
fullscreen
Internet Explorer:版本 4+
Navigator:不支持
定義是否按照全屏方式打開瀏覽器。請小心使用全屏模式,因為在這種模式下,瀏覽器的標題欄和菜單都被隱藏,所有你應該提供一個按鈕或者其他可視的線索來幫助用戶關閉這個窗口。當然,使用熱鍵ALT+F4也能關閉窗口。
window.open("fullscreen.html", "_blank", "fullscreen");
height
Internet Explorer:所有版本
Navigator:所有版本
以象素pixel為單位定義窗口文檔顯示區域的高度,最小數值是100。如果僅僅定義高度,Internet Explorer使用給定的高度和默認的寬度。對于Navigator,如果不同時指定width或者innerWidth,那么就將忽略這個屬性。
window.open("height.html", "_blank", "height=200,width=300");
hotkeys
Internet Explorer:不支持
Navigator:版本 4+
如果沒有定義(或者為0),那么就屏蔽了沒有菜單條的新窗口的大部分熱鍵。但是安全以及退出熱鍵仍然保留。
window.open("hotkeys.html", "_blank", "hotkeys=0,menubar=0");
innerHeight
Internet Explorer:不支持
Navigator:版本 4+
以象素pixel為單位定義窗口文檔顯示區域的高度,最小數值是100。在Navigator版本4中,這個特征替換height,為得是保持向后兼容。對于Navigator,如果不同時指定width或者innerWidth,那么就將忽略這個屬性。
window.open("innerheight.html", "_blank", "innerHeight=200,innerWidth=300");
innerWidth
Internet Explorer:不支持
Navigator:版本 4+
以象素pixel為單位定義窗口文檔顯示區域的寬度,最小數值是100。在Navigator版本4中,這個特征替換width,為得是保持向后兼容。對于Navigator,如果不同時指定height或者innerHeight,那么就將忽略這個屬性。
window.open("innerwidth.html", "_blank", "innerHeight=200,innerWidth=300");
left
Internet Explorer:版本 4+
Navigator:不支持
以象素為單位定義窗口的X左標。
window.open("left.html", "_blank", "left=20");
location
Internet Explorer:所有版本
Navigator:所有版本
定義是否顯示瀏覽器中供地址URL輸入的文本域。
window.open("location.html", "_blank", "location");
menubar
Internet Explorer:所有版本
Navigator:所有版本
定義是否顯示菜單條(菜單條位于窗口頂部,包括“文件”和“編輯”等)。
window.open("menubar.html", "_blank", "menubar");
outerHeight
Internet Explorer:不支持
Navigator:版本 4+
以象素為單位定義窗口(它的外部邊界)的總高度,最小數值比100多一些,因為窗口內容區域的高度必須至少是100。如果沒有同時定義outerWidth,Navigator將忽視這個特征。
window.open("outerheight.html", "_blank", "outerHeight=200,outerWidth=300");
outerWidth
Internet Explorer:不支持
Navigator:版本 4+
以象素為單位定義窗口(它的外部邊界)的總寬度,最小數值比100多一些,因為窗口內容區域的寬度必須至少是100。如果沒有同時定義outerHeight,Navigator將忽視這個特征。
window.open("outerwidth.html", "_blank", "outerHeight=200,outerWidth=300");
resizable
Internet Explorer:所有版本
Navigator:所有版本
定義是否窗口可以通過它的邊界進行大小縮放控制。依賴于平臺不同,用戶也許還有其他改變窗口大小的方法。
window.open("resizable.html", "_blank", "resizable");
screenX
Internet Explorer:不支持
Navigator:版本 4+
以象素為單位定義窗口的X坐標。
window.open("screenx.html", "_blank", "screenX=20");
screenY
Internet Explorer:不支持
Navigator:版本 4+
以象素為單位定義窗口的Y坐標。
window.open("screeny.html", "_blank", "screenY=20");
scrollbars
Internet Explorer:所有版本
Navigator:所有版本
定義是否激活水平和垂直滾動條。
window.open("scrollbars.html", "_blank", "scrollbars");
status
Internet Explorer:所有版本
Navigator:所有版本
定義是否在窗口的下部添加狀態欄。
window.open("status.html", "_blank", "status");
titlebar
Internet Explorer:Version 5+
Navigator:版本 4+
定義是否顯示窗口的標題欄。在Internet Explorer中,除非調用者是一個HTML應用程序或者一個可信任的對話框,那么這個特征是被屏蔽的。
window.open("titlebar.html", "_blank", "titlebar=0");
toolbar
Internet Explorer:所有版本
Navigator:所有版本
定義是否顯示瀏覽器的工具欄(位于窗口的上部,包括“后退”和“向前”)。
window.open("toolbar.html", "_blank", "toolbar");
top
Internet Explorer:版本 4+
Navigator:不支持
以象素為單位定義窗口的縱坐標。
window.open("top.html", "_blank", "top=20");
width
Internet Explorer:所有版本
Navigator:所有版本
以象素pixel為單位定義窗口文檔顯示區域的寬度,最小數值是100。如果僅僅定義寬度,Internet Explorer使用給定的寬度和默認的高度。對于Navigator,如果不同時指定height或者innerHeight,那么就將忽略這個屬性。
window.open("width.html", "_blank", "height=200,width=300");
z-lock
Internet Explorer:不支持
Navigator:版本 4+
定義窗口激活時不在堆棧中浮起,就是說,新窗口當被激活時并不能位于其他窗口之上。
window.open("zlock.html", "_blank", "z-lock");
/P>/html>