我的代碼錯在哪里了 為什么彈不出網(wǎng)頁
? ? var str = confirm("是否打開");
? ? // 通過輸入對話框,確定打開的網(wǎng)址,默認(rèn)為 http://idcbgp.cn/
? ??
? ? if(str == true){
? ? ? var result = prompt("打開的網(wǎng)址是:","http://idcbgp.cn"); ??
? ? ? ? // alert(result);
? ? ? ? ?//打開的窗口要求,寬400像素,高500像素,無菜單欄、無工具欄。
? ? ? ? if(result != null){
? ? ? ? ? ? window.open('http://idcbgp.cn','_blank','width=400,height=500,menubar=no,toolbar=no');
? ? ? ? ? ? // Wopen();
? ? ? ? }else{
? ? ? ? ? ? alert("請輸入網(wǎng)址!");
? ? ? ? }
? ? ? ??
? ? }else{
? ? ? ? alert("再見!");
? ? }
? ?
? ??
2016-02-14
if(str){
window.open('http://www.imooc.con','_blank','width=400,height=500,menubar=no,toolbar=no');
}
你試試這個簡單的? 我認(rèn)為你函數(shù)沒有用對