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

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

代碼問題求解

<!DOCTYPE html>
<html>
?<head>
? <title>瀏覽器對象</title> ?
? <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>? ?

? <script type="text/javascript"> ?
?
?? //獲取顯示秒數(shù)的元素,通過定時器來更改秒數(shù)。

?? //通過window的location和history對象來控制網(wǎng)頁的跳轉(zhuǎn)。
? ?
?var num=5;
?function start()
?{document.getElementById("txt").value=num;
?if(num==0)
?{
??? // window.open("http://www.baidu.com/", "_search");
?? //? window.open("http://www.baidu.com/", "_self");
?
?? window.location.href = "http://idcbgp.cn/";
?
???? ss();
?}
?if(num>0)
?{num--;
?setTimeout("start()",1000);
?}
}
function ss()
{
?? ?if(num<5)
{num++;
setTimeout("ss()",1000);



}

if(num==5)
{
?? ?window.history.go(-1);
}

?
?}

?</script>
?</head>
?<body onload="start()">
???? <p>操作成功</p>
???? <input type="text" id="txt">秒后返回到主頁
???? <span><a href="http://idcbgp.cn">返回</a></span>
?</body>

</html>

求大神幫忙看看,我這是只能跳轉(zhuǎn)到慕課,跳不回來了啊

正在回答

1 回答

start()函數(shù)中的邏輯是當如果num=0的時候就執(zhí)行跳轉(zhuǎn)。都已經(jīng)跳轉(zhuǎn)頁面了,怎么可能會往下執(zhí)行邏輯呢?也就是當num=0的時候start()函數(shù)中的第一個判斷中,只執(zhí)行了?window.location.href = "http://idcbgp.cn/";這一條語句


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

舉報

0/150
提交
取消

代碼問題求解

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

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

幫助反饋 APP下載

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

公眾號

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