轉(zhuǎn)載- 網(wǎng)頁(yè)彈出對(duì)話框
1.彈啟一個(gè)全屏窗口
<html>
<body onload="window.open('http://www.pconline.com.cn','example01','fullscreen');">;
<b>www.e3i5.com</b>
</body>
</html>
2.彈啟一個(gè)被F11化后的窗口
<html>
<body onload="window.open(''http://www.pconline.com.cn','example02','channelmode');">;
<b>www.e3i5.com</b>
</body>
</html>
3.彈啟一個(gè)帶有收藏鏈接工具欄的窗口
<html>
<body onload="window.open('http://www.pconline.com.cn','example03','width=400,height=300,directories');">
<b>www.e3i5.com</b>
</body>
</html>
4.網(wǎng)頁(yè)對(duì)話框
<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>
<b>www.e3i5.com</b>
</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>
<b>http://www.pconline.com.cn</b>
</body>
</html>
showModalDialog()或是showModelessDialog() 來(lái)調(diào)用網(wǎng)頁(yè)對(duì)話框,至于showModalDialog()與showModelessDialog()的區(qū)別,在于showModalDialog()打開的窗口(簡(jiǎn)稱模式窗口),置在父窗口上,必須關(guān)閉才能訪問(wèn)父窗口(建議盡量少用,以免招人反感);showModelessDialog()(簡(jiǎn)稱無(wú)模式窗口),打開后不必關(guān)閉也可訪問(wèn)父窗口打開的窗口。
dialogHeight: iHeight 設(shè)置對(duì)話框窗口的高度。
dialogWidth: iWidth 設(shè)置對(duì)話框窗口的寬度。
dialogLeft: iXPos 設(shè)置對(duì)話框窗口相對(duì)于桌面左上角的left位置。
dialogTop: iYPos 設(shè)置對(duì)話框窗口相對(duì)于桌面左上角的top位置。
center: {yes | no | 1 | 0 } 指定是否將對(duì)話框在桌面上居中,默認(rèn)值是“yes”。
help: {yes | no | 1 | 0 } 指定對(duì)話框窗口中是否顯示上下文敏感的幫助圖標(biāo)。默認(rèn)值是“yes”。
resizable: {yes | no | 1 | 0 } 指定是否對(duì)話框窗口大小可變。默認(rèn)值是“no”。
status: {yes | no | 1 | 0 } 指定對(duì)話框窗口是否顯示狀態(tài)欄。對(duì)于非模式對(duì)話框窗口,默認(rèn)值是“yes”;對(duì)于模式對(duì)話框窗口,默認(rèn)值是 “no”。
posted on 2008-01-27 13:28 limq 閱讀(6857) 評(píng)論(2) 編輯 收藏