62,047
社区成员
发帖
与我相关
我的任务
分享
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>无标题页</title>
<script type="text/javascript">
var n = 2;
function test() {
if (n >= 0) {
document.getElementById("div1").innerHTML = "正在进入延迟" + n + "秒";
n--
setTimeout("test()", 1000);
}
else {
window.location.href = "Default.aspx";//转向
}
}
</script>
</head>
<body onload="test()">
<form id="form1" runat="server">
<div id="div1" style="width:200px; height:30px;">
</div>
</form>
</body>
</html>