課程
/前端開發(fā)
/JavaScript
/JavaScript入門篇
哪里出錯了呢?
2016-03-06
源自:JavaScript入門篇 2-7
正在回答
上述語句8行中,最后那個分號被寫成了中文字符的分號,應(yīng)該改成英文字符的分號。
_正在緩沖99_0 提問者
? ? function openWindow(){
? ? ? ? ? ? var soce = confirm("點(diǎn)擊了確定");
? ? ? ? ? ? if(soce==true){
? ? ? ? ? ?var mat = prompt("請輸入網(wǎng)址:","http://idcbgp.cn");
? ? ? ? ? ?if(mat!=""){
? ? ? ? ? ? ? ? window.open(mat,'_blank','width=400,height=500,menubar=no,toolbar=no');
? ? ? ? ? ?}else{
? ? ? ? ? ? ? ?alert("網(wǎng)址不能為空!");
? ? ? ? ? ?}
? ? ? ? ? ? }
? ? ? ? }
你把onclick那里的openWindow方法自己手動寫一遍再試試
width=400px,height=500px 這里不用加 px
舉報
JavaScript做為一名Web工程師的必備技術(shù),本教程讓您快速入門
4 回答哪里錯了呢
1 回答哪里錯了呢
3 回答哪里錯了呢
3 回答哪里出錯了 ?
2 回答哪里出錯了?
Copyright ? 2025 imooc.com All Rights Reserved | 京ICP備12003892號-11 京公網(wǎng)安備11010802030151號
購課補(bǔ)貼聯(lián)系客服咨詢優(yōu)惠詳情
慕課網(wǎng)APP您的移動學(xué)習(xí)伙伴
掃描二維碼關(guān)注慕課網(wǎng)微信公眾號
2016-03-06
上述語句8行中,最后那個分號被寫成了中文字符的分號,應(yīng)該改成英文字符的分號。
2016-03-06
? ? function openWindow(){
? ? ? ? ? ? var soce = confirm("點(diǎn)擊了確定");
? ? ? ? ? ? if(soce==true){
? ? ? ? ? ?var mat = prompt("請輸入網(wǎng)址:","http://idcbgp.cn");
? ? ? ? ? ?if(mat!=""){
? ? ? ? ? ? ? ? window.open(mat,'_blank','width=400,height=500,menubar=no,toolbar=no');
? ? ? ? ? ?}else{
? ? ? ? ? ? ? ?alert("網(wǎng)址不能為空!");
? ? ? ? ? ?}
? ? ? ? ? ? }
? ? ? ? }
2016-03-06
你把onclick那里的openWindow方法自己手動寫一遍再試試
2016-03-06
width=400px,height=500px 這里不用加 px