62,046
社区成员
发帖
与我相关
我的任务
分享
<meta http-equiv='refresh' content='5;url=index.html'>
<script type="text/javascript">
var second=5;
var timer;
function change()
{
second--;
if(second>-1)
{
document.getElementById("second").innerHTML=second;
timer = setTimeout('change()',1000);
}
else
{
clearTimeout(timer);
}
}
timer = setTimeout('change()',1000);
</script>
<div id="second" style="text-align: center; float: left; color: Red; font-weight: bolder">
5</div>
秒后自动返回首页。
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>无标题页</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<script type="text/javascript">
//<![CDATA[
var go=20000;
var timer=null;
var endTime = new Date().getTime() + go ;
function interval()
{
var n=(endTime-new Date().getTime())/1000;
if(n<0) return;
document.getElementById("jumpTo").innerHTML = n.toFixed(3);
setTimeout(interval, 10);
}
window.onload=function(){
timer=setTimeout("window.location.href='/'", go);
interval();
}
//]]>
</script>
</head>
<body>
<form id="form1" runat="server">
<div>
<span id="jumpTo">20.000</span> 秒后 将自动</span>跳转到
</div>
</form>
</body>
</html>
<script type="text/javascript">
<!--
var time = 10; //时间:秒
function dis() {
if (time > 0) {
document.getElementById("sysj").innerHTML = time;
time--;
}
if(time == 0)
window.location.href = "/Default.aspx";
}
timer = setInterval('dis()', 1000); //显示时间
//-->
</script>
<br />
页面将在 <span id="sysj" style="font-weight:bold"></span>秒后自动跳转到会员中心