< script>setTimeout("location.href='url'",2000)< /script>
< meta http-equiv="refresh" content="300; url=target.html"> 用window.location.href
方法二:
<script type="text/javascript">
var secs = 30; //6为倒计时秒数
for (i = 0; i <= secs; i++) {
window.setTimeout("update(" + i + ")", i * 100);
}
function update(num) {
if (num == secs) {
window.location = "/Default.aspx"; //跳转的页面URL
}
else {
printnr = secs - num;
document.getElementById('sec').innerHTML = printnr;
}
}
</script>