課程
/前端開發
/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("請輸入要打開的網站", "http://www.xianlaiwan.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="新窗口打開網站" onclick="openWindow()" />?
?</body>
</html>
我也是。。。
//?新窗口打開時彈出確認框,是否打開function?openWindow()?{var?a?=?confirm("是否打開新網站")if?(a)?{//?通過輸入對話框,確定打開的網址,默認為?http://www.xianlaiwan.cn/var?b?=?prompt("請輸入網址")//打開的窗口要求,寬400像素,高500像素,無菜單欄、無工具欄。b?==""????window.open("http://www.xianlaiwan.cn/")?:?window.open("http://"?+?b)}}
整理好思路。我只是簡單地寫一下
把前面的概念和用法總結一下? 然后看著你的筆記聯想
舉報
JavaScript做為一名Web工程師的必備技術,本教程讓您快速入門
3 回答學完了為啥就卡在96%不能完成呢
3 回答為啥點擊確定取消改變的時候,里面啥都沒了?
7 回答為啥我的點擊“點擊我”啥都沒有呢?
3 回答請問下為什么點了一下按鈕后頁面啥都沒有?
1 回答為啥一點反應都沒有....
Copyright ? 2025 imooc.com All Rights Reserved | 京ICP備12003892號-11 京公網安備11010802030151號
購課補貼聯系客服咨詢優惠詳情
慕課網APP您的移動學習伙伴
掃描二維碼關注慕課網微信公眾號
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("請輸入要打開的網站", "http://www.xianlaiwan.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="新窗口打開網站" onclick="openWindow()" />?
?</body>
</html>
2019-03-06
我也是。。。
2019-03-02
整理好思路。我只是簡單地寫一下
2019-03-01
把前面的概念和用法總結一下? 然后看著你的筆記聯想