課程
/前端開發(fā)
/JavaScript
/JavaScript入門篇
2016-09-10
源自:JavaScript入門篇 2-7
正在回答
錯(cuò)了3個(gè)標(biāo)點(diǎn)符號(hào)
都用了中文的標(biāo)點(diǎn)了
要用英文的
不加香菜不要蔥 提問者
<!DOCTYPE html>
<html>
?<head>
? <title> new document </title> ?
? <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> ??
? <script type="text/javascript"> ?
? ? function openWindow()
? ? {
? ? var open=confirm("要打開網(wǎng)站么?")
? ? if (open==true)
? ? ? {var webname=prompt("請(qǐng)輸入網(wǎng)址:","http://idcbgp.cn/")
? ? ? ? if (webname!=null)
? ? ? ? {window.open(webname,"_blank","width=400,height=500,menubar=no,toolbar=no");}
? ? ? ? else
? ? ? ? {alert("goodbye");}
? ? ? ? }
? ? else
? ? }
? ? // 新窗口打開時(shí)彈出確認(rèn)框,是否打開
? ?
? ? // 通過輸入對(duì)話框,確定打開的網(wǎng)址,默認(rèn)為 http://idcbgp.cn/
? ? //打開的窗口要求,寬400像素,高500像素,無菜單欄、無工具欄。
? ??
? </script>?
?</head>?
?<body>?
? ? <input type="button" value="新窗口打開網(wǎng)站" onclick="openWindow()" />?
?</body>
</html>
舉報(bào)
JavaScript做為一名Web工程師的必備技術(shù),本教程讓您快速入門
5 回答為什么這樣就不行呢?
6 回答我這樣寫為什么不行
1 回答我這樣寫怎么不行呢??
3 回答為什么這樣不行???求大神支招
6 回答這樣寫有錯(cuò)嗎?為什么運(yùn)行不了呢?
Copyright ? 2025 imooc.com All Rights Reserved | 京ICP備12003892號(hào)-11 京公網(wǎng)安備11010802030151號(hào)
購課補(bǔ)貼聯(lián)系客服咨詢優(yōu)惠詳情
慕課網(wǎng)APP您的移動(dòng)學(xué)習(xí)伙伴
掃描二維碼關(guān)注慕課網(wǎng)微信公眾號(hào)
2016-09-10
錯(cuò)了3個(gè)標(biāo)點(diǎn)符號(hào)
都用了中文的標(biāo)點(diǎn)了
要用英文的
2016-09-10
<!DOCTYPE html>
<html>
?<head>
? <title> new document </title> ?
? <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> ??
? <script type="text/javascript"> ?
? ? function openWindow()
? ? {
? ? var open=confirm("要打開網(wǎng)站么?")
? ? if (open==true)
? ? ? {var webname=prompt("請(qǐng)輸入網(wǎng)址:","http://idcbgp.cn/")
? ? ? ? if (webname!=null)
? ? ? ? {window.open(webname,"_blank","width=400,height=500,menubar=no,toolbar=no");}
? ? ? ? else
? ? ? ? {alert("goodbye");}
? ? ? ? }
? ? else
? ? ? ? {alert("goodbye");}
? ? }
? ? // 新窗口打開時(shí)彈出確認(rèn)框,是否打開
? ?
? ? // 通過輸入對(duì)話框,確定打開的網(wǎng)址,默認(rèn)為 http://idcbgp.cn/
? ? //打開的窗口要求,寬400像素,高500像素,無菜單欄、無工具欄。
? ??
? </script>?
?</head>?
?<body>?
? ? <input type="button" value="新窗口打開網(wǎng)站" onclick="openWindow()" />?
?</body>
</html>