弹出网页窗口全攻略(html/hta)

如何利用网页弹出各种形式的窗口,我想大家大多都是知道些的,但那种多种多样的弹出式窗口是怎么搞出来的,我们今天就来学习一下:

1.弹启一个全屏窗口

1<html>
2<body onload="window.open('http://www.pconline.com.cn','example01','fullscreen');">;   
3<b>www.e3i5.com</b>
4</body>
5</html>

2.弹启一个被F11化后的窗口

1<html>
2<body onload="window.open(''http://www.pconline.com.cn','example02','channelmode');">;   
3<b>www.e3i5.com</b>
4</body>
5</html>

3.弹启一个带有收藏链接工具栏的窗口

1<html>
2<body onload="window.open('http://www.pconline.com.cn','example03','width=400,height=300,directories');">
3<b>www.e3i5.com</b>
4</body>
5</html>

4.网页对话框

 1<html>
 2<script language="javascript">   
 3<!--   
 4showModalDialog('http://www.pconline.com.cn','example04','dialogWidth:400px;dialogHeight:300px;   
 5dialogLeft:200px;dialogTop:150px;center:yes;help:yes;resizable:yes;status:yes')   
 6//-->   
 7</script>
 8<b>www.e3i5.com</b>
 9
10</html>
 1<html>
 2<script language="javascript">   
 3<!--   
 4showModelessDialog('http://www.pconline.com.cn','example05','dialogWidth:400px;dialogHeight:300px;   
 5dialogLeft:200px;dialogTop:150px;center:yes;help:yes;resizable:yes;status:yes')   
 6//-->   
 7</script>
 8<b>http://www.pconline.com.cn</b>
 9
10</html>

showModalDialog()或是showModelessDialog() 来调用网页对话框,至于showModalDialog()与showModelessDialog()的区别,在于showModalDialog()打开的窗口(简称模式窗口),置在父窗口上,必须关闭才能访问父窗口(建议尽量少用,以免招人反感);showModelessDialog()(简称弈J酱翱冢

Published At
Categories with 网页设计
comments powered by Disqus