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

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

這樣寫有錯(cuò)嗎?為什么運(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 open=confirm("確定打開(kāi)窗口?") ? ? ? ?// 新窗口打開(kāi)時(shí)彈出確認(rèn)框,是否打開(kāi)

? ? ? ? if(open==ture){

? ? ? ? ? ? var URL=prompt("請(qǐng)輸入網(wǎng)址","http://idcbgp.cn/") ? ?// 通過(guò)輸入對(duì)話框,確定打開(kāi)的網(wǎng)址,默認(rèn)為 http://idcbgp.cn/

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

? ? ? ? ? ?window.open("http://idcbgp.cn/","_blank","width=400,height=500,menubar=no,toolbar=no,scrollbars=no")} ? //打開(kāi)的窗口要求,寬400像素,高500像素,無(wú)菜單欄、無(wú)工具欄。

? ? ? ? ? ? else{alert("bye!")} }

? ? ? ? ? ??

? ? ? ? ?else{alert("bye!")}

? ? ? ? ?} ? ? ?

? </script>?

?</head>?

?<body>?

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

?</body>

</html>


正在回答

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


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

Bill0123 提問(wèn)者

非常感謝!
2015-08-04 回復(fù) 有任何疑惑可以回復(fù)我~
  1. javascript語(yǔ)句末尾都沒(méi)加分號(hào);

  2. windowopen("http://idcbgp.cn/","_blank","width=400,height=500,menubar=no,toolbar=no,scrollbars=no");

    這一句只能打開(kāi)”http://idcbgp.cn/“,應(yīng)該改為:

    windowopen(URL,"_blank","width=400,height=500,menubar=no,toolbar=no,scrollbars=no");

  3. if(){

    }

    else{

    }

    你的else語(yǔ)句都放在了if語(yǔ)句的大括號(hào)里了哦。。

  4. 標(biāo)點(diǎn)符號(hào)一定記得換成英文輸入?。?!標(biāo)點(diǎn)符號(hào)一定記得換成英文輸入?。?!標(biāo)點(diǎn)符號(hào)一定記得換成英文輸入?。。。ㄖ匾氖虑檎f(shuō)三遍)不然后面找問(wèn)題,會(huì)找到哭的~

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

Bill0123 提問(wèn)者

恩恩 謝謝提醒,我剛開(kāi)始學(xué),經(jīng)常會(huì)犯小錯(cuò)誤 以后一定記住!^_^
2015-08-06 回復(fù) 有任何疑惑可以回復(fù)我~
#2

lt_mk 回復(fù) Bill0123 提問(wèn)者

恩恩,我也剛開(kāi)始學(xué),大家一起加油哈!
2015-08-07 回復(fù) 有任何疑惑可以回復(fù)我~

ture改成true還是不行

0 回復(fù) 有任何疑惑可以回復(fù)我~
if(open==ture){

這里是true,不是ture

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

這里逗號(hào)錯(cuò)了,敲成中文的啦,改成英文的

修改后的代碼

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


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

Perona

嗯,這一句也有問(wèn)題window.open("http://idcbgp.cn/","_blank","width=400,height=500,menubar=no,toolbar=no,scrollbars=no") 這里的冒號(hào)也是中文的,改成英文的吧。
2015-08-03 回復(fù) 有任何疑惑可以回復(fù)我~

舉報(bào)

0/150
提交
取消

這樣寫有錯(cuò)嗎?為什么運(yùn)行不了呢?

我要回答 關(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)