- <html>
- <head><title></title>
- <script language='javascript' type='text/javascript'>
- var secs =5; //倒计时的秒数
- var URL ;
- function Load(url){
- URL =url;
- for(var i=secs;i>=0;i--)
- {
- window.setTimeout('doUpdate(' + i + ')', (secs-i) * 1000);
- }
- }
- function doUpdate(num)
- {
- document.getElementById('ShowDiv').innerHTML = '将在'+num+'秒后自动跳转到 51cto的blog' ;
- if(num == 0) { window.location=URL; }
- }
- </script>
- </head>
- <body>
- <div id="ShowDiv"></div>
- <script language="javascript">
- Load("http://rickcheung.blog.51cto.com/"); //要跳转到的页面
- </script>
- </body>
- </html>
转载于:https://blog.51cto.com/rickcheung/332680