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

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

請(qǐng)各位老師幫忙解答下,我這個(gè)答案是為什么運(yùn)行不了呢?

<!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?st=confirm("你確定要打開窗口嗎?");
??????if(st==true);
??????{
??????????var?sp=prompt("默認(rèn)網(wǎng)站是","http://www.baidu.com");
??????????if(sp==null);
??????????{window.open(url,"_blank",'width=400px,height=500px,menubar=no,toolbar=no');}
??????}
??????????else
??????{
??????????alert("The?end");
??????}
??????else
??????{
??????alert("The?end");
??????}
??}
??</script>?
?</head>?
?<body>?
	??<input?type="button"?value="新窗口打開網(wǎng)站"?onclick="openWindow()"?/>?
?</body>
</html>


正在回答

5 回答

1、if(sp==null)修改為if(sp!=null);

2、url沒有賦值,可以更改為‘sp’。解釋:這里的url沒有任何意義,改為‘sp’后,就是運(yùn)行sp輸入的結(jié)果,輸入什么網(wǎng)址就會(huì)打開什么網(wǎng)址

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

JoeSmith 提問者

親,我已經(jīng)這樣改了,但是還是執(zhí)行不了,不知道為什么
2016-02-25 回復(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("你確定要打開窗口嗎?");
??????if(open==true);
??????{
??????????var?sp=prompt("默認(rèn)網(wǎng)站是","http://www.baidu.com");
??????????if(sp!=null);
??????????{window.open(sp,"_blank",‘width=400px,height=500px,menubar=no,toolbar=no’);}
??????}
??????????else
??????{
??????????alert("The?end");
??????}
??????else
??????{
??????alert("The?end");
??????}
??}
??</script>?
?</head>?
?<body>?
??????<input?type="button"?value="新窗口打開網(wǎng)站"?onclick="openwindow()"?/>?
?</body>
</html>
0 回復(fù) 有任何疑惑可以回復(fù)我~

URL 呢? OPEN誰就寫誰

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

JoeSmith 提問者

好像也不行,prompt()除了不進(jìn)行任何編輯外還有取消,如果點(diǎn)擊取消,就會(huì)返回null,這個(gè)可能不是問題關(guān)鍵,關(guān)鍵是點(diǎn)擊按鈕,根本沒反應(yīng)是什么原因。。
2016-02-25 回復(fù) 有任何疑惑可以回復(fù)我~
#2

慕移動(dòng)3709750 回復(fù) JoeSmith 提問者

window.open(url,"_blank",'width=400px,height=500px,menubar=no,toolbar=no');把里面的url換成sp 都已經(jīng)點(diǎn)取消了干嘛還要加個(gè)if,如果你非要加if也應(yīng)該是if(sp != null)
2016-02-25 回復(fù) 有任何疑惑可以回復(fù)我~
#3

JoeSmith 提問者

哦 明白了
2016-02-25 回復(fù) 有任何疑惑可以回復(fù)我~
#4

JoeSmith 提問者 回復(fù) 慕移動(dòng)3709750

已經(jīng)修改了一下,但是還是執(zhí)行不了。。要瘋了
2016-02-25 回復(fù) 有任何疑惑可以回復(fù)我~
查看1條回復(fù)

url 沒賦值,從哪里跑出來的

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

JoeSmith 提問者

因?yàn)槲铱吹秸Z(yǔ)句是這個(gè)。。。window.open([URL], [窗口名稱], [參數(shù)字符串]) 如果是打開空窗口,應(yīng)該怎么改呢
2016-02-25 回復(fù) 有任何疑惑可以回復(fù)我~

舉報(bào)

0/150
提交
取消

請(qǐng)各位老師幫忙解答下,我這個(gè)答案是為什么運(yù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)