<!DOCTYPE html><html>?<head>? <title>瀏覽器對(duì)象</title> ?? <meta http-equiv="Content-Type" content="text/html; charset=gkb"/>? ??</head>?<body>? 先編寫好網(wǎng)頁(yè)布局? <h1>操作成功</h1>? ? <span id="oddd" >5</span>? <span>秒后回到主頁(yè)</span>? <a href="javascript:back();">返回</a> ??? <script type="text/javascript"> ???? //獲取顯示秒數(shù)的元素,通過定時(shí)器來更改秒數(shù)。var num = document.getElementById("oddd").innerHTML;function block(){??? document.getElementById("oddd").innerHTML=num;??? num--;??? if(num==0){??????? window.location.assign("http://idcbgp.cn/")??? }??? setTimeout("block()",1000);function back(){??? window.history.back();}?? //通過window的location和history對(duì)象來控制網(wǎng)頁(yè)的跳轉(zhuǎn)。? ??</script> </body></html>
我這個(gè)不會(huì)自動(dòng)倒計(jì)數(shù),是什么問題 大神求幫個(gè)忙啊
鈴鐺3
2016-06-19 14:03:54