分类: 建站教程
作者: hopol
XML/HTML代码
  1. <script language='javascript'>  
  2. var sVarPopWin=true;   
  3. function PlayJsAdPopWin()   
  4. {   
  5. if( sVarPopWin )   
  6. {   
  7. popwin=window.open("您需要弹的网站地址","","height=300width=360");   
  8. }   
  9. }   
  10. setTimeout("PlayJsAdPopWin()", 5000 );   
  11. </script>  


上面的代码中有一句

popwin=window.open("您需要弹的网站地址","","height=300, width=360");

后面的 height=300, width=360 是您需要弹出的页面大小。

如果您想直接弹出网页可以用下面的代码。 

XML/HTML代码
  1. <script language='javascript'>  
  2. var sVarPopWin=true;   
  3. function PlayJsAdPopWin()   
  4. {   
  5. if( sVarPopWin )   
  6. {   
  7. popwin=window.open("您需要弹的网站地址","");   
  8. }   
  9. }   
  10. setTimeout("PlayJsAdPopWin()", 5000 );   
  11. </script>  


过IE6.7.傲游 世界之窗 THE WORLD

标签: 5秒, 弹窗, 代码, html, script