終于跑起來了
<!DOCTYPE?html>
<html>
?<head>
??<title>瀏覽器對象</title>??
??<meta?http-equiv="Content-Type"?content="text/html;?charset=gkb"/>???
?</head>
?<body>
??<!--先編寫好網(wǎng)頁布局-->
??<h1>操作成功</h1>
??
?<h3><span?id="con">5</span>
?<span>秒后回到主頁</span><a?href=window.history.back()>返回</a></h3>
?
<script?type="text/javascript">??
var?num?=?5;
function?count(){
????num--;
????document.getElementById("con").innerHTML?=?num;???//獲取顯示秒數(shù)的元素,通過定時器來更改秒數(shù)。
????if(num==1){
????window.location.assign("http://idcbgp.cn/");
????}?
}
setInterval(count,1000);
</script>?
</body>
</html>終于跑起來了
2015-12-23
終于跑起來了