标签:javascript
<span style="font-size:14px;">setTimeout(function,milliseconds)</span>
<html> <head> <title>定时打开窗口显示广告信息</title> <style type="text/css"> body{ background-image:url(new.jpg); background-repeat:no-repeat; } </style> </head> <body></body> </html>2.应用function函数创建自定义pp()函数,同时应用setTimeout()方法实现定时打开窗口,代码如下
<pre name="code" class="html"><html> <head> <meta charset="utf-8" /> <script type="text/jscript" language="javascript"> function pp() { window.open("new.html","new","height=280,width=800,top=10,left=20,resizable=no, location=no",false); } setTimeout("pp()",5000); </script> <style type="text/css"> p{ font-size:24px; color:#F00; } </style> </head> <body> <p>网站首页</p> </body> </html>
标签:javascript
原文地址:http://blog.csdn.net/yejinwei1220/article/details/45565527