function openWindow(){ if(confirm("是否打开新窗口?") == true){ var webSite = prompt("确定打开的网址","www.imooc.com") if(webSite !== null){ window.open (webSite,"_blank","width=400,height=500,menubar=no,toolbar=no") }; }; };
function openWindow(){
var message = confirm("是否确认打开网页?");
if(message==true){
var temp = prompt("输入网址");
if(temp==""){
temp = "http://www.imooc.com/";
}
window.open(temp,"_blank","width=400,height=500,menubar=no,toolbar=no");
}
}
你的会执行吗?