課程
/前端開發(fā)
/JavaScript
/JavaScript入門篇
emmmm 小白自學(xué)的 為啥彈窗都沒有= =
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('是否開啟新網(wǎng)站');
? ? ? ? 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="新窗口打開網(wǎng)站" onclick="openWindow()" />?
?</body>
</html>
else....
fAt_Tower 提問者
截圖上那個(gè)的話吧gbk換成utf-8
你回復(fù)里的這個(gè)可以出來啊
qq_慕虎2027758 回復(fù) fAt_Tower 提問者
// 新窗口打開時(shí)彈出確認(rèn)框,是否打開
var popup=confirm("確定要彈窗嗎?");
// 通過輸入對(duì)話框,確定打開的網(wǎng)址,默認(rèn)為 http://idcbgp.cn/
if (popup==true)
{
window.open (
"http://idcbgp.cn","_blank","width=400px,height=500px"
);
}
eles
alert ("歡迎下次光臨!");
//打開的窗口要求,寬400像素,高500像素,無菜單欄、無工具欄。
這樣是否正確呢
舉報(bào)
JavaScript做為一名Web工程師的必備技術(shù),本教程讓您快速入門
3 回答請(qǐng)大家?guī)臀铱聪聠栴}出在了哪里?
1 回答哪里出錯(cuò)了 ,哪位大佬來幫忙看看
2 回答大佬快來幫忙看看問題出在哪里了 運(yùn)行無反應(yīng)
1 回答大佬們看看,我這個(gè)哪里有問題
3 回答這串代碼哪里問題??有大佬幫看看嗎
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)
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('是否開啟新網(wǎng)站');
? ? ? ? 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="新窗口打開網(wǎng)站" onclick="openWindow()" />?
?</body>
</html>
2019-03-15
else....
2019-03-15
截圖上那個(gè)的話吧gbk換成utf-8
2019-03-15
你回復(fù)里的這個(gè)可以出來啊
2019-03-15
// 新窗口打開時(shí)彈出確認(rèn)框,是否打開
var popup=confirm("確定要彈窗嗎?");
// 通過輸入對(duì)話框,確定打開的網(wǎng)址,默認(rèn)為 http://idcbgp.cn/
if (popup==true)
{
window.open (
"http://idcbgp.cn","_blank","width=400px,height=500px"
);
}
eles
{
alert ("歡迎下次光臨!");
}
//打開的窗口要求,寬400像素,高500像素,無菜單欄、無工具欄。
這樣是否正確呢