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

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

好像哪里太對(duì)。。求解

<!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?msg?=?confirm("是否打開?");
????????if(msg=true){
????????????var?newopen?=?prompt("請(qǐng)輸入網(wǎng)址",?"http://idcbgp.cn/");
????????????if(newopen!=null){
????????????window.open("http://idcbgp.cn","_blank","width=400,?height=500,menubar=no,toolbar=no");
????????????}
????????????else{
????????????alert("無(wú)法打開");
????????}
????????else{
????????????alert("無(wú)法打開");
????????}
????}
????//?新窗口打開時(shí)彈出確認(rèn)框,是否打開
????//?通過(guò)輸入對(duì)話框,確定打開的網(wǎng)址,默認(rèn)為?http://idcbgp.cn/
????//打開的窗口要求,寬400像素,高500像素,無(wú)菜單欄、無(wú)工具欄。
??</script>?
?</head>?
?<body>?
	??<input?type="button"?value="新窗口打開網(wǎng)站"?onclick="openWindow()"?/>?
?</body>
</html>

倆個(gè)else的部分都出不來(lái),為啥

正在回答

4 回答

<!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 msg = confirm("是否打開?");

? ? ? ? if(msg==true){

? ? ? ? ? ? var newopen = prompt("請(qǐng)輸入網(wǎng)址", "http://idcbgp.cn/");

? ? ? ? ? ? if(newopen!=null){

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

? ? ? ? ? ? }

? ? ? ? ? ? else{

? ? ? ? ? ? alert("無(wú)法打開");

? ? ? ? }

? ? ? ? }

? ? ? ? else{

? ? ? ? ? ? alert("無(wú)法打開");

? ? ? ? }

? ??

? ? }

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

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

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

? </script>?

?</head>?

?<body>?

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

?</body>

</html>


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

? ? ?else

? ? ? ? {

? ? ? ? ? ?alert("無(wú)法打開");

? ? ? ? }

? ? ? ? }

? ? ? ? else

? ? ? ? {alert("無(wú)法打開");}

? ? }

把這個(gè)改一下就可以。額

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

慕粉1826222000 提問(wèn)者

恩啊 找到原因了 謝謝呀
2017-02-10 回復(fù) 有任何疑惑可以回復(fù)我~

if少了一個(gè)};

function?openWindow(){

????????var?msg?=?confirm("是否打開?");

????????if(msg==true){

????????????var?newopen?=?prompt("請(qǐng)輸入網(wǎng)址",?"http://idcbgp.cn/");

????????????if(newopen!=null){

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

????????????}

????????????else{

????????????alert("無(wú)法打開");

????????}

}

????????else{

????????????alert("無(wú)法打開");

????????}

????}


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

慕粉1826222000 提問(wèn)者

發(fā)現(xiàn)問(wèn)題所在了 謝謝呀
2017-02-10 回復(fù) 有任何疑惑可以回復(fù)我~

大括號(hào)寫的太亂了 對(duì)不上 ?還有判斷是==,=是賦值 ?if(msg=true)應(yīng)該是恒成立

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

慕粉1826222000 提問(wèn)者

嗷嗚 找了好久終于發(fā)現(xiàn)原因了 還是謝謝你的耐心回答
2017-02-10 回復(fù) 有任何疑惑可以回復(fù)我~

舉報(bào)

0/150
提交
取消
JavaScript入門篇
  • 參與學(xué)習(xí)       741079    人
  • 解答問(wèn)題       9811    個(gè)

JavaScript做為一名Web工程師的必備技術(shù),本教程讓您快速入門

進(jìn)入課程

好像哪里太對(duì)。。求解

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

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

幫助反饋 APP下載

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

公眾號(hào)

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