課程
/前端開發(fā)
/JavaScript
/JavaScript入門篇
沒有彈出確認(rèn)框????
2020-02-17
源自:JavaScript入門篇 2-7
正在回答
var open=comfirm("是否創(chuàng)建新窗口?")這一句,你的confirm拼寫的是comfirm
你的confirm打錯(cuò)了,你的是comfirm
qq_黑瞳_dkvDJ9 提問者
function openWindow()
? ? {
? ? ? ? // var char=);
? ? ? ? if(confirm("是否打開新窗口"==true)
? ? ? ? {
? ? ? ? ? ? window.open(prompt("請(qǐng)確認(rèn)要打開的網(wǎng)址","http://yifanck.cn"),"_blank","width=400,height:500,menubar=no,toolbar=no");
? ? ? ? }
? ? }
你在</script>上一行加個(gè)openWindow();
mushji 回復(fù) qq_黑瞳_dkvDJ9 提問者
black打錯(cuò)了 <!DOCTYPE?html><html>?<head>??<title>?new?document?</title>????<meta?http-equiv="Content-Type"?content="text/html;?charset=gbk"/>?????<script?type="text/javascript">????????function?openWindow(){?????????alert("aa");????????var?open?=?confirm("是否打開新窗口?");????????if(open==true){????????????????????????var?mymessgae?=?promt("打開新的網(wǎng)站",'http://yifanck.cn');????????????if(mymessage?!=null){????????????????window.open('http://yifanck.cn','_black','width=300,height=200,menubar=no,toolbar=no);????????????}????????????else?{;}????}????else?{;}????????}??</script>??</head>??<body>? ??<input?type="button"?value="新窗口打開網(wǎng)站"?onclick="openWindow()"?/>??</body></html>
?function?openWindow(){????????//?新窗口打開時(shí)彈出確認(rèn)框,是否打開????????var?al?=?confirm("點(diǎn)確定彈出新窗口");????????if?(al==true)?{?????????????window.open('http://yifanck.cn','_blank',?????????????'width'=400,'height'=500,'menubar','toolbar');????????}
舉報(bào)
JavaScript做為一名Web工程師的必備技術(shù),本教程讓您快速入門
2 回答為什么沒彈出確認(rèn)框?
4 回答為什么連確認(rèn)框都沒有彈出?
5 回答求教謝謝,為什么沒有彈出確認(rèn)框
1 回答為什么點(diǎn)擊沒有彈出確認(rèn)對(duì)話框
2 回答前面的確認(rèn)框和對(duì)話框都能正常彈出,但最后又出現(xiàn)了確認(rèn)框,就是沒有彈出網(wǎng)頁,不知道為啥?
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)
2020-02-24
var open=comfirm("是否創(chuàng)建新窗口?")這一句,你的confirm拼寫的是comfirm
2020-02-22
你的confirm打錯(cuò)了,你的是comfirm
2020-02-21
function openWindow()
? ? {
? ? ? ? // var char=);
? ? ? ? if(confirm("是否打開新窗口"==true)
? ? ? ? {
? ? ? ? ? ? window.open(prompt("請(qǐng)確認(rèn)要打開的網(wǎng)址","http://yifanck.cn"),"_blank","width=400,height:500,menubar=no,toolbar=no");
? ? ? ? }
? ? }
2020-02-20
你在</script>上一行加個(gè)openWindow();
2020-02-19
2020-02-18