請問為什么不管輸入的網(wǎng)址是什么最后都會打開慕課網(wǎng)的頁面呢?
代碼如下:
function openWindow(){
??????? if(confirm("是否打開新窗口")){
??????????? var domain = prompt("請輸入網(wǎng)址:");
??????????? window.open(domain,"_blank",'width=400,height=500');
??????? }
??? }
代碼如下:
function openWindow(){
??????? if(confirm("是否打開新窗口")){
??????????? var domain = prompt("請輸入網(wǎng)址:");
??????????? window.open(domain,"_blank",'width=400,height=500');
??????? }
??? }
2016-04-06
舉報
2016-04-06
已驗證。在webstrom上是可以打開其他網(wǎng)址了。樓上是正解
2016-04-07
html
2016-04-06
?if(confirm("是否打開新窗口"))這樣根本打不開
2016-04-06
后臺的代碼吧。。。