JavaScript代码:
1 //设置超时时间为10秒钟 2 var timeout = 10; 3 function show() { 4 var showbox = $(".showbox"); 5 showbox.html(timeout); 6 timeout--; 7 if (timeout == 0) { 8 window.opener = null; 9 window.location.href = "index.aspx"; 10 } 11 else { 12 setTimeout("show()", 1000); 13 } 14 }
源代码:下载