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

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

沒(méi)思路的可以看看我的,可能沒(méi)那么好,但功能還是做出來(lái)了

<!DOCTYPE html>

<html>

<head>

<title>瀏覽器對(duì)象</title>

<meta http-equiv="Content-Type" content="text/html; charset=gkb" />

</head>

<style type="text/css">

#icon {

position: absolute;

}

</style>

<body>

<!--先編寫(xiě)好網(wǎng)頁(yè)布局-->

<h3>操作成功</h3>

<span id="icon">5</span>

<p>&nbsp;&nbsp;s后回到主頁(yè)<a href="#">返回</a></p>


<script type="text/javascript">

var dom = document.getElementById("icon");

var time = setInterval(clock, 5000)

//獲取顯示秒數(shù)的元素,通過(guò)定時(shí)器來(lái)更改秒數(shù)。

var time1 = setTimeout(click, 1000)


function clock() {

window.location.assign("https://www.baidu.com/")

window.location.href("https://www.baidu.com/")

}

var a = 5;


function click() {

//判斷如果a = 0就終止循環(huán)

if (a == 0) {

clearTimeout(time1);

} else {

document.getElementById("icon").value = a;

a--

console.log(a)

time1 = setTimeout(click, 1000) //當(dāng)a - 1 之后繼續(xù)執(zhí)行setTimeout函數(shù)

document.getElementById("icon").innerHTML = a; //把a(bǔ)的值實(shí)時(shí)的賦給HTML元素,從而改變頁(yè)面上的數(shù)字

}

}


//通過(guò)window的location和history對(duì)象來(lái)控制網(wǎng)頁(yè)的跳轉(zhuǎn)。

</script>

</body>

</html>


正在回答

舉報(bào)

0/150
提交
取消

沒(méi)思路的可以看看我的,可能沒(méi)那么好,但功能還是做出來(lái)了

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

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

幫助反饋 APP下載

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

公眾號(hào)

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