1,在标签中建立onload事件,用作自动刷新; ? 1 < body onload = "shownum()" > 2,在<script>中编写onload事件: ? 1 2 3 4 5 6 <script type= "text/javascript" > var i = 6; function shownum(){ i=i-1; document.getElementById( "time" ).innerHTML=i+ "秒后自动跳转登陆 界面" ; setTimeout( 'shownum()' ,1000); } </script> 3,编写自动跳转事件: ? 1 < meta http-equiv = "refresh" content ="5;url=<%=basePath%>jsp/login.jsp">