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

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

幫忙看下代碼哪里錯(cuò)了,單擊button沒有反應(yīng)

<html>

<head>

<meta charset="utf-8">

<title>打開新網(wǎng)頁</title>

<script type="text/javascript">

function wopen(){

var mess =confirm("確認(rèn)要打開新窗口嗎");

if(mess==true){

var _url = prompt("請(qǐng)輸入要的開的網(wǎng)址","http://www.immc.com");

window.open(_url,"_blank");}

else

{alert("再見")}

}

</script>

</head>

<body>

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

</body>

</html>


正在回答

5 回答

<html>
<head>
<meta?charset="utf-8">
<title>打開新網(wǎng)頁</title>
<script?type="text/javascript">
function?wopen(){
var?_url;
var?mess?=confirm("確認(rèn)要打開新窗口嗎");
if(mess==true){
_url?=?prompt("請(qǐng)輸入要的開的網(wǎng)址","http://www.immc.com");
window.open(_url,"_blank");}
else
{alert("再見")}
}
</script>
</head>
<body>
<input?type="button"?value="新窗口打開網(wǎng)站"?onClick="wopen()"/>
</body>
</html>

符號(hào)問題
0 回復(fù) 有任何疑惑可以回復(fù)我~
#1

唐林l 提問者

非常感謝!
2016-11-16 回復(fù) 有任何疑惑可以回復(fù)我~
#2

慕少1893982 回復(fù) 唐林l 提問者

我也經(jīng)常翻了個(gè)錯(cuò)誤,下次你可以把代碼保存到本地,然后瀏覽器打開用審查元素去調(diào)試一下
2016-11-17 回復(fù) 有任何疑惑可以回復(fù)我~

<html>

<head>

<meta charset="utf-8">

<title>打開新網(wǎng)頁</title>

<script type="text/javascript">

function wopen(){

var url;

var mess =confirm("確認(rèn)要打開新窗口嗎");

if(mess==true){

url = prompt("請(qǐng)輸入要的開的網(wǎng)址","http://www.immc.com");

if(url=="http://www.immc.com"){

window.open('url','_blank');

}}

else

{alert("再見")}

}

</script>

</head>

<body>

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

</body>

</html>


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

唐林l 提問者

謝謝是符號(hào)有問題,解決了
2016-11-16 回復(fù) 有任何疑惑可以回復(fù)我~

你的代碼是沒有問題的,你試試用你的本地編輯器試一試,我用huBuilder是可以打開的

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

holykit

你22行的中文也是需要?jiǎng)h掉的
2016-11-16 回復(fù) 有任何疑惑可以回復(fù)我~
#2

唐林l 提問者

謝謝是符號(hào)有問題,解決了
2016-11-16 回復(fù) 有任何疑惑可以回復(fù)我~

<html>

<head>

<meta charset="utf-8">

<title>打開新網(wǎng)頁</title>

<script type="text/javascript">

function wopen(){

var mess =confirm("確認(rèn)要打開新窗口嗎");

if(mess==true){

var _url = prompt("請(qǐng)輸入要的開的網(wǎng)址"

}

</script>

</head>

<body>

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

</body>

</html>


#1

唐林l 提問者

謝謝是符號(hào)有問題,解決了
2016-11-16 回復(fù) 有任何疑惑可以回復(fù)我~

var url = prompt("請(qǐng)輸入要的開的網(wǎng)址","http://www.immc.com");

window.open(url,"_blank");}

我把下劃線刪了,還有請(qǐng)輸入網(wǎng)址后面的逗號(hào)你好像不是英文輸入的?


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

唐林l 提問者

謝謝是符號(hào)有問題,解決了
2016-11-16 回復(fù) 有任何疑惑可以回復(fù)我~

舉報(bào)

0/150
提交
取消

幫忙看下代碼哪里錯(cuò)了,單擊button沒有反應(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)