1.彈啓一個全屏窗口
<html>
<body οnlοad="window.open('http://www.pconline.com.cn','example01','fullscreen');">;
</body>
</html>
2.彈啓一個被F11化後的窗口
<html>
<body οnlοad="window.open(''http://www.pconline.com.cn','example02','channelmode');">;
</body>
</html>
3.彈啓一個帶有收藏鏈接工具欄的窗口
<html>
<body οnlοad="window.open('http://www.pconline.com.cn','example03','width=400,height=300,directories');">
<b>www.e3i5.com</b>
</body>
</html>
4.網頁對話框
<html>
<SCRIPT LANGUAGE="javascript">
<!--
showModalDialog('http://www.pconline.com.cn','example04','dialogWidth:400px;dialogHeight:300px;
dialogLeft:200px;dialogTop:150px;center:yes;help:yes;resizable:yes;status:yes')
//-->
</SCRIPT>
</body>
</html>
<html>
<SCRIPT LANGUAGE="javascript">
<!--
showModelessDialog('http://www.pconline.com.cn','example05','dialogWidth:400px;dialogHeight:300px;
dialogLeft:200px;dialogTop:150px;center:yes;help:yes;resizable:yes;status:yes')
//-->
</SCRIPT>
</body>
</html>
showModalDialog()或是showModelessDialog() 來調用網頁對話框,至於showModalDialog()與showModelessDialog()的區別,在於showModalDialog()打開的窗口(簡稱模式窗口),置在父窗口上,必須關閉才能訪問父窗口(建議儘量少用,以免招人反感);showModelessDialog()(簡稱無模式窗口),打開後不必關閉也可訪問父窗口打開的窗口。
dialogHeight: iHeight 設置對話框窗口的高度。
dialogWidth: iWidth 設置對話框窗口的寬度。
dialogLeft: iXPos 設置對話框窗口相對於桌面左上角的left位置。
dialogTop: iYPos 設置對話框窗口相對於桌面左上角的top位置。
center: {yes | no | 1 | 0 } 指定是否將對話框在桌面上居中,默認值是“yes”。
help: {yes | no | 1 | 0 } 指定對話框窗口中是否顯示上下文敏感的幫助圖標。默認值是“yes”。
resizable: {yes | no | 1 | 0 } 指定是否對話框窗口大小可變。默認值是“no”。
status: {yes | no | 1 | 0 } 指定對話框窗口是否顯示狀態欄。對於非模式對話框窗口,默認值是“yes”;對於模式對話框窗口,默認值是 “no”。