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

為了賬號安全,請及時綁定郵箱和手機立即綁定

終于解決了

<!DOCTYPE html>

<html>

<head>

<title>瀏覽器對象</title>

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

</head>

<body>

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

<h3>操作成功</h3>

<label id="second">5</label>

<span>秒后回到主頁</span>

<a href="http://idcbgp.cn" target="_self">返回</a>

<script type="text/javascript">

var time = 5;


function clock() {

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

document.getElementById("second").innerHTML = time;

time = time - 1;

if(time==-1){

clearInterval(i);

window.location.href="http://idcbgp.cn";

}

}

i=setInterval(clock, 1000);

//通過window的location和history對象來控制網(wǎng)頁的跳轉(zhuǎn)。

</script>

</body>

</html>


正在回答

1 回答

<!DOCTYPE?html><html>?<head>??<title>瀏覽器對象</title>????<meta?http-equiv="Content-Type"?content="text/html;?charset=gkb"/>???<style?type="text/css">??????#timeStep?{??????????font-weight:bold;??????}??????.backStyle?{??????????color:blue;??????????text-decoration:underline;??????}??</style>??</head>?<body>??<!--先編寫好網(wǎng)頁布局-->??<h2>操作成功</h2>????<p><span?id="timeStep">5</span>秒后回到主頁?<span?class="backStyle"?onclick="goback()">返回</span></p>???<script?type="text/javascript">????var?stepDom?=?document.getElementById("timeStep");??var?step?=?parseInt(stepDom.innerText);??var?stepInterval?=?setInterval(onload,?1000);??function?onload()?{????step?=?step-1;????stepDom.innerText?=?step;??????if?(step?==?1)?{??????????clearInterval(stepInterval);??????????window.open("http://idcbgp.cn",?"_blank");??????}??}??function?goback()?{??????window.history.back();??}?</script>?</body></html>


0 回復 有任何疑惑可以回復我~
#1

我不懂public

慕課的代碼排版真的很垃圾,就不能做好點嗎
2019-11-19 回復 有任何疑惑可以回復我~

舉報

0/150
提交
取消
JavaScript進階篇
  • 參與學習       468761    人
  • 解答問題       22416    個

本課程從如何插入JS代碼開始,帶您進入網(wǎng)頁動態(tài)交互世界

進入課程
微信客服

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

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動學習伙伴

公眾號

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