求助 不知道哪錯了 都不好使
<!DOCTYPE html>
<html>
?<head>
? <title>瀏覽器對象</title> ?
? <meta http-equiv="Content-Type" content="text/html; charset=gkb"/> ??
?</head>
?<body>
? <!--先編寫好網頁布局-->
? <h2>操作成功</h2>
? <span id="second">5</span>
? <span>秒后回到首頁</span>
? <a href="javascript:return();">返回</a>
?
? <script type="text/javascript"> ?
? ? var i=document.getElementById("second").innerHTML;
? ? function count(){
? ? ? ? i--;
? ? ? ? document.getElementById("second").innerHTML=i;
? ? ? ? if(i==0){
? ? ? ? ? ? location.assign("www.imooc.cin");
? ? ? ? }
? ? ? ? }
? ? ? ? setInterval("count()",1000);
? ?//獲取顯示秒數的元素,通過定時器來更改秒數。
? ? function return(){
? ? ? ? window.history.back();
? ? }
? ?//通過window的location和history對象來控制網頁的跳轉。
? ?
?</script>?
</body>
</html>
2016-01-13
?//獲取顯示秒數的元素,通過定時器來更改秒數。
? ? function return(){
? ? ? ? window.history.back();
? ? }
這個函數名 return 你換一個就好了,用了關鍵字,報錯了??