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

為了賬號安全,請及時綁定郵箱和手機立即綁定

這代碼對嗎?為什么要設置函數(shù)我不理解。

<!DOCTYPE html> <html> <head> <title> new document </title> <meta http-equiv="Content-Type" content="text/html; charset=gbk"/> <script type="text/javascript"> // 新窗口打開時彈出確認框,是否打開 function windiwopen();{ var mywin=confirm("您確認進入新網(wǎng)址嗎??"); if(mywin==true){ var mywi=prompt("請輸入您將要進去的網(wǎng)址:"); if(mywi!=null){ alert("歡迎進入"); window.open('http://idcbgp.cn/','_blank','width=400,height=500th,menubar=no,toolbar=no');} else{ alert("您需要輸入地址哦");} else{ document.write("好吧,您離開了網(wǎng)頁"); } }// 通過輸入對話框,確定打開的網(wǎng)址,默認為 http://idcbgp.cn/ //打開的窗口要求,寬400像素,高500像素,無菜單欄、無工具欄。 </script> </head> <body> <input type="button" value="新窗口打開網(wǎng)站" onclick="openWindow()" /> </body> </html>

正在回答

2 回答

<!DOCTYPE html>

?<html>?

?<head>?

?<title> new document </title>

?<meta charset="utf-8">

? <meta http-equiv="Content-Type" content="text/html; charset=gbk"/>?

? <script type="text/javascript">?

? ?function windiwopen()

? ?{?

? ? var mywin=confirm("您確認進入新網(wǎng)址嗎??");?

? ?if(mywin==true)

? ? { var mywi=prompt("請輸入您將要進去的網(wǎng)址:","http://idcbgp.cn/");?

? ? ? ?if(mywi!=null)

? ? ? ? ? {?

? ? ? ? ? ? alert("歡迎進入");?

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

? ? ?}?

? ?else

? ? {?

? ? ? alert("您需要輸入地址哦");

? ? }?

? }

? ?else{?

? ? ? document.write("好吧,您離開了網(wǎng)頁");

? ? ? ?}

? ? ?}

? ? ?</script>

? ? ? </head>?

? ? ? <body>?

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

? ? ? </body>

? ? ? ?</html>

主要是最后的函數(shù)名沒改

0 回復 有任何疑惑可以回復我~
#1

慕娘9868777 提問者

thank you
2017-07-30 回復 有任何疑惑可以回復我~
#2

子非愚96

不對啊,這個代碼用戶輸入的地址沒采用,只能打開imooc
2017-07-31 回復 有任何疑惑可以回復我~

不對,調(diào)用的函數(shù)名是openWindow(),而且在第一個else之后應該再加一個}

像這樣

<!DOCTYPE html>

<html>?

<head>

<title> new document </title>

<meta http-equiv="Content-Type" content="text/html; charset=gbk"/>

<script type="text/javascript">?

// 新窗口打開時彈出確認框,是否打開?

function windowopen()

{?

? ? var mywin=confirm("您確認進入新網(wǎng)址嗎??");

if(mywin==true)

{?

? ? var mywi=prompt("請輸入您將要進去的網(wǎng)址:","http://idcbgp.cn/");

? ??

? ? if(mywi!=null){ alert("歡迎進入");

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

else{ alert("您需要輸入地址哦");} }

else{ document.write("好吧,您離開了網(wǎng)頁"); }

}// 通過輸入對話框,確定打開的網(wǎng)址,默認為 http://idcbgp.cn/ //打開的窗口要求,寬400像素,高500像素,無菜單欄、無工具欄。?

</script>?

</head>?

<body>?

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

</body>

</html>


0 回復 有任何疑惑可以回復我~

舉報

0/150
提交
取消

這代碼對嗎?為什么要設置函數(shù)我不理解。

我要回答 關注問題
微信客服

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

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網(wǎng)微信公眾號