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

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

為什么網(wǎng)頁(yè)打不開(kāi)?

<!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 window=confirm("新窗口打開(kāi)網(wǎng)站");

? ? ? if(window==true){

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

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

? ? ? ? ? ? ? window.open(url,"_blank","width=400px,height=500px,menubar=no,tolbar=no");

? ? ? ? ? }else{

? ? ? ? ? alert("88");

? ? ? ? ? }

? ? ? }else{

? ? ? ? ? alert("88");

? ? ? }

? ? ??

? ? ? }


? </script>?

?</head>?

?<body>?

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

?</body>

</html>


正在回答

3 回答

window.open("http://www.baidu.com"...)要是完整url,變量不要用window,可以用window1,還有注意符號(hào)。

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

樓上說(shuō)的很對(duì)。

1.把window = confirm(...); 改為其他,入res

2.改window.open(http,"_blank","width=400px,height=500px,menubar=no,tolbar=no");

另外判斷還可以精簡(jiǎn)為if(res)和if(http)

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

CrazyBo

tolbar=no 改為 toolbar=no
2016-01-25 回復(fù) 有任何疑惑可以回復(fù)我~
  1. 你的URL沒(méi)寫(xiě);?

  2. window關(guān)鍵字不能當(dāng)成 變量名

正確寫(xiě)法:

function openWindow(){

? ? ? var str=confirm("新窗口打開(kāi)網(wǎng)站");

? ? ? if(str==true){

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

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

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

? ? ? ? ? }else{

? ? ? ? ? alert("88");

? ? ? ? ? }

? ? ? }else{

? ? ? ? ? alert("88");

? ? ? }

? ? ??

? ? ? }


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

舉報(bào)

0/150
提交
取消

為什么網(wǎng)頁(yè)打不開(kāi)?

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