页面代码如下:
<%
String url=null;
if(session.getAttribute("url")!=null)
url=(String)session.getAttribute("url");
%>
<div align="center"><h1>sucess!</h1>
<p>请等待,3秒钟后自动跳转<meta content='3;url=<%=url%>' http-equiv="refresh"/></p>
</div>
如何让content秒可以显示倒记时的效果
即3.2.1..
<%
String url=null;
if(session.getAttribute("url")!=null)
url=(String)session.getAttribute("url");
%>
<div align="center"><h1>sucess!</h1>
<p>请等待,3秒钟后自动跳转<meta content='3;url=<%=url%>' http-equiv="refresh"/></p>
</div>
如何让content秒可以显示倒记时的效果
即3.2.1..
用javascript的,每1秒就更改一个innerHTML的内容;
function closetime(){
doit();
}function doit(){
content.innerHTML=parseFloat(content.innerHTML)-1;
if (thistd.innerHTML=="0"){
window.location=你的url
}
setTimeout("doit()",1000);
}
</script>
<body onload='closetime();'>
到你规定的时候的时候把true变为false,再运行你想运行的东西就行了,跳转,刷新随便了
HTML 自带的,
<meta http-equiv="REFRESH" content="3; url=http://www.****.com">
content="3 就是3秒
<div id="wait" align="center"><h1>sucess!</h1>
<p>请等待,3秒钟后自动跳转<meta content='3;url=<%=url%>' http-equiv="refresh"/></p>
</div>for (i=3; i>0; i--)
{
window.setTimeout('change('+i+')',i*1000);
}
window.setTimeout("agree()",3000);
function agree()
{
document.getElementById('wait').value='请等待,正在自动跳转';
}
function change(Num)
{
Num = 3-Num;
document.getElementById('wait').value='请等待,' + Num + '秒钟后自动跳转';
}