第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定

為什么點(diǎn)擊返回就顯示找不到文件?

<!DOCTYPE?html>
<html>?
<head>??
<title>瀏覽器對(duì)象</title>????
<meta?http-equiv="Content-Type"?content="text/html;?charset=gkb"/>????
</head>?
<body>??
<!--先編寫好網(wǎng)頁(yè)布局-->????
<p><b>操作成功</b></p>??
<p><span?id='num1'>5</span>秒后回到主頁(yè)?<a?href="history()">返回</a></p>???????
<script?type="text/javascript">?????
var?num=?document.getElementById('num1').innerHTML???
//獲取顯示秒數(shù)的元素,通過定時(shí)器來(lái)更改秒數(shù)。???
console.log(num)???
function?number(){???????
num--;???????
ocument.getElementById('num1').innerHTML=num???????
if(num==0){???????????
location.assign("http://idcbgp.cn");???????
}??????
etTimeout('number()',1000)???
}??????s
etTimeout('number()',1000)???
//通過window的location和history對(duì)象來(lái)控制網(wǎng)頁(yè)的跳轉(zhuǎn)。???
function?history(){???????
window.history.back()???
}?
</script>?
</body>
</html>

https://img1.sycdn.imooc.com//5c1368860001fe0f03720297.jpg

正在回答

2 回答

就我看來(lái),你的代碼有以下幾個(gè)問題。

1:17行? document寫錯(cuò)了,ocument.

2:21,22行,setTimeout寫成了etTimeout

3:<a?href="history()">返回</a></p>??
這一句里,雖然JS href標(biāo)簽可以接函數(shù),語(yǔ)法是href="javascript:function()",但是這種寫法不推薦:推薦寫法:

href="http://idcbgp.cn" onclick="history()"。

4.你的number()函數(shù)內(nèi),location.assign("http://idcbgp.cn");??? 改為window.location.assign("http://idcbgp.cn");


1 回復(fù) 有任何疑惑可以回復(fù)我~

沒有上一頁(yè)吧

0 回復(fù) 有任何疑惑可以回復(fù)我~

舉報(bào)

0/150
提交
取消

為什么點(diǎn)擊返回就顯示找不到文件?

我要回答 關(guān)注問題
微信客服

購(gòu)課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)