SoFunction
Updated on 2025-03-10

Countdown and automatic jump page in JSP

The teacher said he wanted to write a blog, and then he could only re-extract the blog that he had hidden in many years. Today, I will share the countdown and automatic jump page in JSP.

Going crazy and finally finished coding just now, the web page went wrong.

1. Create an onload event in the tag to be used as automatic refresh;

<body onload="shownum()">

2. Write the onload event in <script>:

&lt;script type="text/javascript"&gt; 
var i = 6; function shownum(){ 
i=i-1; ("time").innerHTML=i+"Automatically jump to log in after seconds
 interface";
setTimeout('shownum()',1000); } 
&lt;/script&gt;

3. Write automatic jump events:

<meta http-equiv="refresh" content ="5;url=<%=basePath%>jsp/">

4. Get it done