請指正一下我哪里寫錯了,謝謝
請問我哪寫錯了,為啥點了確定第二層的輸入框出不來 ? ? function openWindow(){ ? ?var jr=confirm("是否打開網頁"); ? ?if(jr==true){ ? ? ? ? prompt("請輸入網址:","www.xianlaiwan.cn"); ? ? ? ?window.open('http://www.xianlaiwan.cn/','_bank','width=400,height=500,menubar=no,toolbar=no') ? ? ? ?} ? ? ? ? ? ? ?}
2016-05-26
_blank 不是_bank ?然后 ?http://www.xianlaiwan.cn? 這里的冒號不是英文的 ?最后也多了個/
2016-05-26
function openWindow()
? ? ? {
? ? ? ? ? var jr = confirm("是否打開網頁");
? ? ? ? ? if (jr == true)
? ? ? ? ? {
? ? ? ? ? ? ? var address = prompt("請輸入網址:", "http://www.imocc.com");
? ? ? ? ? ? ? if (address != null) {
? ? ? ? ? ? ? ? ? window.open(address, '_bank', 'width=400,height=500,menubar=no,toolbar=no');
? ? ? ? ? ? ? }
? ? ? ? ? }
? ? ? }
試試
2016-05-26
if句沒有else,這個判定成立么?
2016-05-26
?prompt("請輸入網址:","www.xianlaiwan.cn");
更改為?prompt("請輸入網址:")