課程
/前端開發(fā)
/JavaScript
/JavaScript入門篇
emmmm 小白自學的 為啥彈窗都沒有= =
2019-03-15
源自:JavaScript入門篇 2-7
正在回答
<!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 mymesenge=confirm('是否開啟新網站');
? ? ? ? if(mymesenge==true)
? ? ? ? {
? ? ? ? window.open('http://idcbgp.cn/','width=400,height=500,menubar=no,toolbar=no');
? ? ? ? }
? ? ? ? else
? ? ? ? ? ?mymesenge.close();?
? ? }
? </script>?
?</head>?
?<body>?
? <input type="button" value="新窗口打開網站" onclick="openWindow()" />?
?</body>
</html>
else....
fAt_Tower 提問者
截圖上那個的話吧gbk換成utf-8
你回復里的這個可以出來啊
qq_慕虎2027758 回復 fAt_Tower 提問者
// 新窗口打開時彈出確認框,是否打開
var popup=confirm("確定要彈窗嗎?");
// 通過輸入對話框,確定打開的網址,默認為 http://idcbgp.cn/
if (popup==true)
{
window.open (
"http://idcbgp.cn","_blank","width=400px,height=500px"
);
}
eles
alert ("歡迎下次光臨!");
//打開的窗口要求,寬400像素,高500像素,無菜單欄、無工具欄。
這樣是否正確呢
舉報
JavaScript做為一名Web工程師的必備技術,本教程讓您快速入門
3 回答請大家?guī)臀铱聪聠栴}出在了哪里?
1 回答哪里出錯了 ,哪位大佬來幫忙看看
2 回答大佬快來幫忙看看問題出在哪里了 運行無反應
1 回答大佬們看看,我這個哪里有問題
3 回答這串代碼哪里問題??有大佬幫看看嗎
Copyright ? 2025 imooc.com All Rights Reserved | 京ICP備12003892號-11 京公網安備11010802030151號
購課補貼聯(lián)系客服咨詢優(yōu)惠詳情
慕課網APP您的移動學習伙伴
掃描二維碼關注慕課網微信公眾號
2019-03-18
<!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 mymesenge=confirm('是否開啟新網站');
? ? ? ? if(mymesenge==true)
? ? ? ? {
? ? ? ? window.open('http://idcbgp.cn/','width=400,height=500,menubar=no,toolbar=no');
? ? ? ? }
? ? ? ? else
? ? ? ? {
? ? ? ? ? ?mymesenge.close();?
? ? ? ? }
? ? }
? </script>?
?</head>?
?<body>?
? <input type="button" value="新窗口打開網站" onclick="openWindow()" />?
?</body>
</html>
2019-03-15
else....
2019-03-15
截圖上那個的話吧gbk換成utf-8
2019-03-15
你回復里的這個可以出來啊
2019-03-15
// 新窗口打開時彈出確認框,是否打開
var popup=confirm("確定要彈窗嗎?");
// 通過輸入對話框,確定打開的網址,默認為 http://idcbgp.cn/
if (popup==true)
{
window.open (
"http://idcbgp.cn","_blank","width=400px,height=500px"
);
}
eles
{
alert ("歡迎下次光臨!");
}
//打開的窗口要求,寬400像素,高500像素,無菜單欄、無工具欄。
這樣是否正確呢