/* 功能: 实现几秒后跳转页面 */ window.onload=function(){ goTime(); } var goUrl="member_add.jsp"; function goTime(){ var time= parseInt(document.getElementById("timeId").innerHTML); time--; if(time==0){ window.location=goUrl; }else{ document.getElementById("timeId").innerHTML=time; setTimeout(goTime,1000); } }