window.open()--窗口參數(shù)詳解!
Posted on 2007-08-08 15:31 love1563 閱讀(412) 評(píng)論(0) 編輯 收藏 所屬分類(lèi): JSP/Servlets/JSFwindow.open()方法中,窗口控制參數(shù)的詳細(xì)定義:
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:不支持
指定是否按照劇場(chǎng)模式顯示窗口,以及是否顯示頻道區(qū)。
window.open("channelmode.html", "_blank", "channelmode");
dependent
Internet Explorer:不支持
Navigator:版本 4+
定義是否窗口成為當(dāng)前打開(kāi)窗口的依賴(lài)子窗口。依賴(lài)窗口就是當(dāng)它的父窗口關(guān)閉時(shí),它也隨即關(guān)閉。在windows平臺(tái)上,一個(gè)依賴(lài)窗口不會(huì)在任務(wù)欄上顯示。
window.open("dependent.html", "_blank", "dependent");
directories
Internet Explorer:所有版本
Navigator:所有版本
指定是否顯示目錄按鈕(比如眾所周知的"What's Cool" and "What's New" 按鈕)。Internet Explorer將這些目錄按鈕引用為鏈接工具欄,Navigator(版本4和以上)稱(chēng)之為個(gè)人工具欄。
window.open("directories.html", "_blank", "directories");
fullscreen
Internet Explorer:版本 4+
Navigator:不支持
定義是否按照全屏方式打開(kāi)瀏覽器。請(qǐng)小心使用全屏模式,因?yàn)樵谶@種模式下,瀏覽器的標(biāo)題欄和菜單都被隱藏,所有你應(yīng)該提供一個(gè)按鈕或者其他可視的線(xiàn)索來(lái)幫助用戶(hù)關(guān)閉這個(gè)窗口。當(dāng)然,使用熱鍵ALT+F4也能關(guān)閉窗口。
window.open("fullscreen.html", "_blank", "fullscreen");
height
Internet Explorer:所有版本
Navigator:所有版本
以象素pixel為單位定義窗口文檔顯示區(qū)域的高度,最小數(shù)值是100。如果僅僅定義高度,Internet Explorer使用給定的高度和默認(rèn)的寬度。對(duì)于Navigator,如果不同時(shí)指定width或者innerWidth,那么就將忽略這個(gè)屬性。
window.open("height.html", "_blank", "height=200,width=300");
hotkeys
Internet Explorer:不支持
Navigator:版本 4+
如果沒(méi)有定義(或者為0),那么就屏蔽了沒(méi)有菜單條的新窗口的大部分熱鍵。但是安全以及退出熱鍵仍然保留。
window.open("hotkeys.html", "_blank", "hotkeys=0,menubar=0");
innerHeight
Internet Explorer:不支持
Navigator:版本 4+
以象素pixel為單位定義窗口文檔顯示區(qū)域的高度,最小數(shù)值是100。在Navigator版本4中,這個(gè)特征替換height,為得是保持向后兼容。對(duì)于Navigator,如果不同時(shí)指定width或者innerWidth,那么就將忽略這個(gè)屬性。
window.open("innerheight.html", "_blank", "innerHeight=200,innerWidth=300");
innerWidth
Internet Explorer:不支持
Navigator:版本 4+
以象素pixel為單位定義窗口文檔顯示區(qū)域的寬度,最小數(shù)值是100。在Navigator版本4中,這個(gè)特征替換width,為得是保持向后兼容。對(duì)于Navigator,如果不同時(shí)指定height或者innerHeight,那么就將忽略這個(gè)屬性。
window.open("innerwidth.html", "_blank", "innerHeight=200,innerWidth=300");
left
Internet Explorer:版本 4+
Navigator:不支持
以象素為單位定義窗口的X左標(biāo)。
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+
以象素為單位定義窗口(它的外部邊界)的總高度,最小數(shù)值比100多一些,因?yàn)榇翱趦?nèi)容區(qū)域的高度必須至少是100。如果沒(méi)有同時(shí)定義outerWidth,Navigator將忽視這個(gè)特征。
window.open("outerheight.html", "_blank", "outerHeight=200,outerWidth=300");
outerWidth
Internet Explorer:不支持
Navigator:版本 4+
以象素為單位定義窗口(它的外部邊界)的總寬度,最小數(shù)值比100多一些,因?yàn)榇翱趦?nèi)容區(qū)域的寬度必須至少是100。如果沒(méi)有同時(shí)定義outerHeight,Navigator將忽視這個(gè)特征。
window.open("outerwidth.html", "_blank", "outerHeight=200,outerWidth=300");
resizable
Internet Explorer:所有版本
Navigator:所有版本
定義是否窗口可以通過(guò)它的邊界進(jìn)行大小縮放控制。依賴(lài)于平臺(tái)不同,用戶(hù)也許還有其他改變窗口大小的方法。
window.open("resizable.html", "_blank", "resizable");
screenX
Internet Explorer:不支持
Navigator:版本 4+
以象素為單位定義窗口的X坐標(biāo)。
window.open("screenx.html", "_blank", "screenX=20");
screenY
Internet Explorer:不支持
Navigator:版本 4+
以象素為單位定義窗口的Y坐標(biāo)。
window.open("screeny.html", "_blank", "screenY=20");
scrollbars
Internet Explorer:所有版本
Navigator:所有版本
定義是否激活水平和垂直滾動(dòng)條。
window.open("scrollbars.html", "_blank", "scrollbars");
status
Internet Explorer:所有版本
Navigator:所有版本
定義是否在窗口的下部添加狀態(tài)欄。
window.open("status.html", "_blank", "status");
titlebar
Internet Explorer:Version 5+
Navigator:版本 4+
定義是否顯示窗口的標(biāo)題欄。在Internet Explorer中,除非調(diào)用者是一個(gè)HTML應(yīng)用程序或者一個(gè)可信任的對(duì)話(huà)框,那么這個(gè)特征是被屏蔽的。
window.open("titlebar.html", "_blank", "titlebar=0");
toolbar
Internet Explorer:所有版本
Navigator:所有版本
定義是否顯示瀏覽器的工具欄(位于窗口的上部,包括“后退”和“向前”)。
window.open("toolbar.html", "_blank", "toolbar");
top
Internet Explorer:版本 4+
Navigator:不支持
以象素為單位定義窗口的縱坐標(biāo)。
window.open("top.html", "_blank", "top=20");
width
Internet Explorer:所有版本
Navigator:所有版本
以象素pixel為單位定義窗口文檔顯示區(qū)域的寬度,最小數(shù)值是100。如果僅僅定義寬度,Internet Explorer使用給定的寬度和默認(rèn)的高度。對(duì)于Navigator,如果不同時(shí)指定height或者innerHeight,那么就將忽略這個(gè)屬性。
window.open("width.html", "_blank", "height=200,width=300");
z-lock
Internet Explorer:不支持
Navigator:版本 4+
定義窗口激活時(shí)不在堆棧中浮起,就是說(shuō),新窗口當(dāng)被激活時(shí)并不能位于其他窗口之上。
window.open("zlock.html", "_blank", "z-lock");
/P>/html>