在示例中,我设置了5秒后将跳转到另一个页面,然后过2秒再跳转回来
<%
@ page contentType
=
"
text/html;charset=gb2312
"
%>
< html >
< head >
< meta http - equiv = " Content-Type " content = " text/html; charset=gb2312 " >
< meta HTTP - EQUIV = REFRESH CONTENT = ' 5; URL=error.jsp ' >
< title > 在5秒后返回指定的页面 </ title >
</ head >
< body topmargin = 0 >
< TABLE width = 600 border = " 0 " align = center cellpadding = 4 cellspacing = 1 class = " tableBorder " >
< TR >
< Th height = " 25 " align = center >< B > 这是一个测试 </ B ></ Th >
</ TR >
< TR >< TD align = center >< BR >
本页面将在 < b >< span id = yu > 5 </ span ></ b > 秒后自动返回用户管理页面,您可以选择以下操作: < BR >
< BR >
< li >< a href = " index.jsp " > 返回本页 </ a ></ li >< br >< br >
< li >< a href = ' error.jsp ' > 其它操作 </ a ></ li >
</ TD ></ TR >
</ TABLE >
< script >
function countDown(secs)
... {
yu.innerText=secs;if(--secs>0)setTimeout("countDown("+secs+")",1000);
}
countDown( 5 );
</ script >
</ body >
</ html >
< html >
< head >
< meta http - equiv = " Content-Type " content = " text/html; charset=gb2312 " >
< meta HTTP - EQUIV = REFRESH CONTENT = ' 5; URL=error.jsp ' >
< title > 在5秒后返回指定的页面 </ title >
</ head >
< body topmargin = 0 >
< TABLE width = 600 border = " 0 " align = center cellpadding = 4 cellspacing = 1 class = " tableBorder " >
< TR >
< Th height = " 25 " align = center >< B > 这是一个测试 </ B ></ Th >
</ TR >
< TR >< TD align = center >< BR >
本页面将在 < b >< span id = yu > 5 </ span ></ b > 秒后自动返回用户管理页面,您可以选择以下操作: < BR >
< BR >
< li >< a href = " index.jsp " > 返回本页 </ a ></ li >< br >< br >
< li >< a href = ' error.jsp ' > 其它操作 </ a ></ li >
</ TD ></ TR >
</ TABLE >
< script >
function countDown(secs)
... {
yu.innerText=secs;if(--secs>0)setTimeout("countDown("+secs+")",1000);
}
countDown( 5 );
</ script >
</ body >
</ html >
<%
@ page contentType
=
"
text/html;charset=gb2312
"
%>
< html >
< head >
< meta http - equiv = " Content-Type " content = " text/html; charset=gb2312 " >
< meta HTTP - EQUIV = REFRESH CONTENT = ' 2; URL=index.jsp ' >
< title > 在5秒后返回指定的页面 </ title >
</ head >
< body topmargin = 0 >
< br />
< p align = " center " > 这是一个跳转后的页面 </ p >
</ body >
</ html >
< html >
< head >
< meta http - equiv = " Content-Type " content = " text/html; charset=gb2312 " >
< meta HTTP - EQUIV = REFRESH CONTENT = ' 2; URL=index.jsp ' >
< title > 在5秒后返回指定的页面 </ title >
</ head >
< body topmargin = 0 >
< br />
< p align = " center " > 这是一个跳转后的页面 </ p >
</ body >
</ html >