JS定时跳转URL并输出剩余秒数
<script language='javascript' type='text/javascript'> var secs =0; //倒计时的秒数 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; if(num == 0) { window.location=URL; } } </script> </head> <body> <div id="ShowDiv"></div> <script language="javascript"> Load("http://www.51kqvod.com"); </script>