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

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

哪里出錯(cuò)了為什么都運(yùn)行不了

?function winopen()

? {var open=confirm("是否在新窗口中打開(kāi)網(wǎng)站?");

? if(open==true)

? {var url=prompt("是否輸入新網(wǎng)址?","http://idcbgp.cn");

? if(url!=null)

? {window.open(opp,"_blank",width=400px,height=500px,menubar=no,toolbar=no);

? }

? else

? {alert("結(jié)束");}

? }

? else

? {alert("結(jié)束");}

? } ??


正在回答

5 回答

<!DOCTYPE?html>
<html>
?<head>
??<title>?new?document?</title>??
??<meta?http-equiv="Content-Type"?content="text/html;?charset=gbk"/>???
??<script?type="text/javascript">??
????
????//?新窗口打開(kāi)時(shí)彈出確認(rèn)框,是否打開(kāi)
function?openWindow(){
????var?a=confirm("你是否要打開(kāi)慕課網(wǎng)");
????if(a==true){
????????var?b=prompt("你確定要打開(kāi)慕課網(wǎng)?","http://idcbgp.cn");
????????if(b!=null){
????????????window.open("http://idcbgp.cn","_blank","width=400,height=500,menubar=no,toolbar=no")
????????}
????}
????
????}
????//?通過(guò)輸入對(duì)話框,確定打開(kāi)的網(wǎng)址,默認(rèn)為?http://idcbgp.cn/

????//打開(kāi)的窗口要求,寬400像素,高500像素,無(wú)菜單欄、無(wú)工具欄。
????
????
??</script>?
?</head>?
?<body>?
	??<input?type="button"?value="新窗口打開(kāi)網(wǎng)站"?onclick="openWindow()"?/>?
?</body>
</html>


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

拉滴嘎嘎 提問(wèn)者

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

function名winopen與onclick的openWindow不同;

window.open(opp,"_blank",width=400px,height=500px,menubar=no,toolbar=no)中opp是新變量,opp應(yīng)為url;

width=400px,height=500px,menubar=no,toolbar=no應(yīng)加引號(hào)

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

window.open(url,"_black","width=400px,height=500px,menubar=no,toolbar=no");

切記加引號(hào)


0 回復(fù) 有任何疑惑可以回復(fù)我~
?function?winopen(){
??????var?open=confirm("是否在新窗口中打開(kāi)網(wǎng)站?");
??????if(open==true){
??????????var?url=prompt("是否輸入新網(wǎng)址?","http://idcbgp.cn");
??????????if(url!=null){
?????????????window.open(opp,"_blank",width=400px,height=500px,menubar=no,toolbar=no);
??????????}else{
?????????????alert("結(jié)束");
??????????}????????
??????}else{
?????????alert("結(jié)束")
??????};
??}

這是你的代碼,我改了一下,發(fā)現(xiàn)else有問(wèn)題

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

拉滴嘎嘎 提問(wèn)者

我感覺(jué)可能是運(yùn)行器的問(wèn)題 我直接復(fù)制過(guò)去 還是不能運(yùn)行
2016-11-22 回復(fù) 有任何疑惑可以回復(fù)我~
#2

我不是管家 回復(fù) 拉滴嘎嘎 提問(wèn)者

我挺想知道是不是onclick沒(méi)有加
2016-11-22 回復(fù) 有任何疑惑可以回復(fù)我~

確定在input標(biāo)簽中泄漏<input?type="button"?value="新窗口打開(kāi)網(wǎng)站"?onclick="openWindow()"?/>?

里的onclick

0 回復(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)