課程
/前端開發(fā)
/JavaScript
/JavaScript入門篇
為什么不知道從哪里開始下手了呢?
2019-03-01
源自:JavaScript入門篇 2-7
正在回答
<!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 message = confirm("新窗口打開")
? ? ? ? if (message == true )
? ? ? ? {
? ? ? ? ? ?var inputs = prompt("請(qǐng)輸入要打開的網(wǎng)站", "http://idcbgp.cn/")
? ? ? ? ? ?if (inputs != null && inputs != "")
? ? ? ? ? ?{
? ? ? ? ? ? ? ?window.open(inputs, "_blank", "width=400,height=500,menubar=no,toolbar=no,scrollbar=no")
? ? ? ? ? ?}
? ? ? ? ? else
? ? ? ? ? {
? ? ? ? ? ? ? window.open("http://www.baidu.com/")
? ? ? ? ? }
? ? ? ? }
? ? }
? </script>?
?</head>?
?<body>?
?<input type="button" value="新窗口打開網(wǎng)站" onclick="openWindow()" />?
?</body>
</html>
我也是。。。
//?新窗口打開時(shí)彈出確認(rèn)框,是否打開function?openWindow()?{var?a?=?confirm("是否打開新網(wǎng)站")if?(a)?{//?通過輸入對(duì)話框,確定打開的網(wǎng)址,默認(rèn)為?http://idcbgp.cn/var?b?=?prompt("請(qǐng)輸入網(wǎng)址")//打開的窗口要求,寬400像素,高500像素,無菜單欄、無工具欄。b?==""????window.open("http://idcbgp.cn/")?:?window.open("http://"?+?b)}}
整理好思路。我只是簡(jiǎn)單地寫一下
把前面的概念和用法總結(jié)一下? 然后看著你的筆記聯(lián)想
舉報(bào)
JavaScript做為一名Web工程師的必備技術(shù),本教程讓您快速入門
3 回答學(xué)完了為啥就卡在96%不能完成呢
3 回答為啥點(diǎn)擊確定取消改變的時(shí)候,里面啥都沒了?
7 回答為啥我的點(diǎn)擊“點(diǎn)擊我”啥都沒有呢?
3 回答請(qǐng)問下為什么點(diǎn)了一下按鈕后頁(yè)面啥都沒有?
1 回答為啥一點(diǎn)反應(yīng)都沒有....
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)
2019-03-09
<!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 message = confirm("新窗口打開")
? ? ? ? if (message == true )
? ? ? ? {
? ? ? ? ? ?var inputs = prompt("請(qǐng)輸入要打開的網(wǎng)站", "http://idcbgp.cn/")
? ? ? ? ? ?if (inputs != null && inputs != "")
? ? ? ? ? ?{
? ? ? ? ? ? ? ?window.open(inputs, "_blank", "width=400,height=500,menubar=no,toolbar=no,scrollbar=no")
? ? ? ? ? ?}
? ? ? ? ? else
? ? ? ? ? {
? ? ? ? ? ? ? window.open("http://www.baidu.com/")
? ? ? ? ? }
? ? ? ? }
? ? }
? </script>?
?</head>?
?<body>?
?<input type="button" value="新窗口打開網(wǎng)站" onclick="openWindow()" />?
?</body>
</html>
2019-03-06
我也是。。。
2019-03-02
整理好思路。我只是簡(jiǎn)單地寫一下
2019-03-01
把前面的概念和用法總結(jié)一下? 然后看著你的筆記聯(lián)想