现在的位置: 首页 > 综合 > 正文

收集:javascript网页精华代码–几种弹出窗口

2013年10月02日 ⁄ 综合 ⁄ 共 1569字 ⁄ 字号 评论关闭

 1.弹启一个全屏窗口

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

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

 

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

 

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

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

 

4.网页对话框

  1. <html> 
  2. <SCRIPT LANGUAGE=javascript> 
  3. <!-- 
  4. showModalDialog 
  5. ('http://www.pconline.com.cn','example04','dialogWidth:400px;dialogHeight:300px; 
  6. dialogLeft:200px;dialogTop:150px;center:yes;help:yes;resizable:yes;status:yes') 
  7. //--> 
  8. </SCRIPT> 
  9. <b>[url]www.e3i5.com[/url]</b> 
  10. </body> 
  11. </html> 
  12. <html> 
  13. <SCRIPT LANGUAGE=javascript> 
  14. <!-- 
  15. showModelessDialog 
  16. ('http://www.pconline.com.cn','example05','dialogWidth:400px;dialogHeight:300px; 
  17. dialogLeft:200px;dialogTop:150px;center:yes;help:yes;resizable:yes;status:yes') 
  18. //--> 
  19. </SCRIPT> 
  20. <b> target=_blank>[url]http://www.pconline.com.cn[/url]</b> 
  21. </body> 
  22. </html> 

  1. showModalDialog()与showModelessDialog()的区别,在于showModalDialog()打开模式窗口, 
  2. showModelessDialog()打开无模式窗口。 
  3. dialogHeight: iHeight 设置对话框窗口的高度。 
  4. dialogWidth: iWidth 设置对话框窗口的宽度。    
  5. dialogLeft: iXPos 设置对话框窗口相对于桌面左上角的left位置。 
  6. dialogTop: iYPos 设置对话框窗口相对于桌面左上角的top位置。 
  7. center: {yes no 1 0 } 指定是否将对话框在桌面上居中,默认值是“yes”。 
  8. help: {yes no 1 0 } 指定对话框窗口中是否显示上下文敏感的帮助图标。默认值是“yes”。    
  9. resizable: {yes no 1 0 } 指定是否对话框窗口大小可变。默认值是“no”。 
  10. status: {yes no 1 0 } 指定对话框窗口是否显示状态栏。对于非模式对话框窗口,默认值是“yes”; 
  11. 对于模式对话框窗口,默认值是 “no”。

 

 

完。

抱歉!评论已关闭.