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

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

為啥點(diǎn)擊沒反應(yīng)啊


<!DOCTYPE html>

<html>

?<head>

? <title> new document </title> ?

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

? <script type="text/javascript"> ?

?function text(){

? ? var open=confirm(“是否重新打開網(wǎng)址”)

? ? ?if(open=true)

? ? ?{var wangzhi=prompt("通過輸入對(duì)話框,確定打開的網(wǎng)址“默認(rèn)為 http://idcbgp.cn/") }

? ? ?if(wangzhi=null)

? ? ?{window.open(wangzhi,'_blank','width=400px','height=500px','menubar=no','toolbar=no')}

? ? ?else

? ? ?{alert("再見")}

? ? ?else

? ? ?{alert("再見")}// 新窗口打開時(shí)彈出確認(rèn)框,是否打開

? ? }text()

? ? ??

?

? ? // 通過輸入對(duì)話框,確定打開的網(wǎng)址,默認(rèn)為 http://idcbgp.cn/


? ? //打開的窗口要求,寬400像素,高500像素,無菜單欄、無工具欄。

? ??

? ??

? </script>?

?</head>?

?<body>?

?<input type="button" value="新窗口打開網(wǎng)站" onclick="openWindow()" />?

?</body>

</html>


正在回答

4 回答

1、函數(shù)名必須為openWindow(),這樣點(diǎn)擊的時(shí)候才會(huì)觸發(fā)

2、if判斷里面,應(yīng)該用==判斷

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

qq_喃澀噲_0 提問者

還是沒反應(yīng)啊= = 是這個(gè)慕課網(wǎng)練習(xí)的編輯器有問題么··
2018-05-31 回復(fù) 有任何疑惑可以回復(fù)我~
#2

陳金云

var open=confirm('是否重新打開網(wǎng)址') if(open=true){var wangzhi=prompt("通過輸入對(duì)話框,確定打開的網(wǎng)址“默認(rèn)為 http://idcbgp.cn/") if(wangzhi){window.open(wangzhi,'_blank','width=400px','height=500px','menubar=no','toolbar=no')}else{alert("再見")}} else{alert("再見")}// 新窗口打開時(shí)彈出確認(rèn)框,是否打開 }
2018-05-31 回復(fù) 有任何疑惑可以回復(fù)我~
#3

陳金云 回復(fù) qq_喃澀噲_0 提問者

這是幫你改的,你的代碼的if-else的層次也有問題,你做下對(duì)比
2018-05-31 回復(fù) 有任何疑惑可以回復(fù)我~
#4

qq_喃澀噲_0 提問者

非常感謝!
2018-05-31 回復(fù) 有任何疑惑可以回復(fù)我~
#5

qq_喃澀噲_0 提問者 回復(fù) 陳金云

為啥改成你這樣 點(diǎn)擊就有反應(yīng)呢~~我對(duì)比半天 我和別人的 就給取得名字不同啊···
2018-05-31 回復(fù) 有任何疑惑可以回復(fù)我~
查看2條回復(fù)

?function openWindow(){


? ? var open=confirm("是否重新打開網(wǎng)址");


? ? ?if(open==true){

? ? ? ? ?var wangzhi=prompt("通過輸入對(duì)話框,確定打開的網(wǎng)址“默認(rèn)為 http://idcbgp.cn/") ;


? ? ? ? if(wangzhi==null){

? ? ? ? ? ? window.open("http://idcbgp.cn/",'_blank','width=400px,height=500px,menubar=no,toolbar=no')}

? ? ? ? else{alert("再見")}

? ? ?}


? ? ?else{alert("再見")}// 新窗口打開時(shí)彈出確認(rèn)框,是否打開


? ? }

你的prompt是要點(diǎn)擊取消才會(huì)返回null;注意“”的英文狀態(tài),還有if大括號(hào)的范圍

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

<!DOCTYPE html>

<html>

?<head>

? <title> new document </title> ?

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

? <script type="text/javascript"> ?

?function openWindow(){

? ? var open=confirm(“是否重新打開網(wǎng)址”);

? ? ?if(open==true)

? ? ?{

? ? ? ? ?var wangzhi=prompt("通過輸入對(duì)話框,確定打開的網(wǎng)址“默認(rèn)為 http://idcbgp.cn/")?

? ? ? ? ?

? ? ?};

? ? ?if(wangzhi==null)

? ? ?{

? ? ? ? ?window.open('http://idcbgp.cn/','_blank','width=400px','height=500px','menubar=no','toolbar=no')

? ? ? ? ?

? ? ?};

? ? ?else

? ? ?{

? ? ? ? ?alert("再見")

? ? ? ? ?

? ? ?};

? ? ?else

? ? ?{

? ? ? ? ?alert("再見")

? ? ? ? ?

? ? ?};// 新窗口打開時(shí)彈出確認(rèn)框,是否打開

? ? }openWindow()

? ? ??

?

? ? // 通過輸入對(duì)話框,確定打開的網(wǎng)址,默認(rèn)為 http://idcbgp.cn/


? ? //打開的窗口要求,寬400像素,高500像素,無菜單欄、無工具欄。

? ??

? ??

? </script>?

?</head>?

?<body>?

?<input type="button" value="新窗口打開網(wǎng)站" onclick="openWindow()" />?

?</body>

</html>

還是點(diǎn)擊沒反應(yīng)啊··是這個(gè)練習(xí)的編輯器有問題嗎?

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

if(open==true){

//注意 是==不是=

}

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

舉報(bào)

0/150
提交
取消

為啥點(diǎn)擊沒反應(yīng)啊

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

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

幫助反饋 APP下載

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

公眾號(hào)

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