課程
/前端開(kāi)發(fā)
/JavaScript
/JavaScript入門篇
來(lái)個(gè)準(zhǔn)確的大神吧
2017-06-21
源自:JavaScript入門篇 2-7
正在回答
"window.open(url." ? ?這個(gè)url啥用啊
<!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 open=confirm("確認(rèn)新建窗口打開(kāi)網(wǎng)站嗎?");
? ? ? ? ? ? if(open==true)
? ? ? ? ? ? ? ? {var url=prompt("通過(guò)輸入對(duì)話框,確定打開(kāi)的網(wǎng)址","http://idcbgp.cn");
? ? ? ? ? ? ? ? ? ? if(url!==null){
? ? ? ? ? ? ? ? ? ? ? ? window.open(url,"_blank",'width=400px,height=500px,menubar=no,toolbar=no');
? ? ? ? ? ? ? ? ? ? }
? ? ? ? ? ? ? ? ? ? ?else{
? ? ? ? ? ? ? ? ? ? ? ? ?alert("再見(jiàn)2");
? ? ? ? ? ? } ??
? ? ? ? ? ?else{
? ? ? ? ? ? ? ?alert("再見(jiàn)1");
? ? ? ? ? ? }
? ? ?}
?</script>?
?</head>?
?<body>?
?<input type="button" value="新窗口打開(kāi)網(wǎng)站" onclick="openWindow()" />?
?</body>
</html>
舉報(bào)
JavaScript做為一名Web工程師的必備技術(shù),本教程讓您快速入門
4 回答不知道怎么寫了。。。
2 回答完整的代碼
1 回答這個(gè)代碼完整是怎么樣的?
1 回答代碼不知道哪里錯(cuò)了?
11 回答不知道哪里代碼錯(cuò)了
Copyright ? 2025 imooc.com All Rights Reserved | 京ICP備12003892號(hào)-11 京公網(wǎng)安備11010802030151號(hào)
購(gòu)課補(bǔ)貼聯(lián)系客服咨詢優(yōu)惠詳情
慕課網(wǎng)APP您的移動(dòng)學(xué)習(xí)伙伴
掃描二維碼關(guān)注慕課網(wǎng)微信公眾號(hào)
2017-07-04
"window.open(url." ? ?這個(gè)url啥用啊
2017-06-21
<!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 open=confirm("確認(rèn)新建窗口打開(kāi)網(wǎng)站嗎?");
? ? ? ? ? ? if(open==true)
? ? ? ? ? ? ? ? {var url=prompt("通過(guò)輸入對(duì)話框,確定打開(kāi)的網(wǎng)址","http://idcbgp.cn");
? ? ? ? ? ? ? ? ? ? if(url!==null){
? ? ? ? ? ? ? ? ? ? ? ? window.open(url,"_blank",'width=400px,height=500px,menubar=no,toolbar=no');
? ? ? ? ? ? ? ? ? ? }
? ? ? ? ? ? ? ? ? ? ?else{
? ? ? ? ? ? ? ? ? ? ? ? ?alert("再見(jiàn)2");
? ? ? ? ? ? ? ? ? ? }
? ? ? ? ? ? } ??
? ? ? ? ? ?else{
? ? ? ? ? ? ? ?alert("再見(jiàn)1");
? ? ? ? ? ? }
? ? ?}
?</script>?
?</head>?
?<body>?
?<input type="button" value="新窗口打開(kāi)網(wǎng)站" onclick="openWindow()" />?
?</body>
</html>