<script type="text/javascript">
function openWindow(){
var choose=confirm("是否打开?");
if (choose=ture){
var aaa=prompt("确认打开网址","http://www.imooc.com");
window.open(aaa,'_blank','width=400,height=500,menubar=no,toolbar=no');
}
else{
alert("失败");
}
}
</script>
</head>
<body>
<input type="button" value="新窗口打开网站" onclick="openWindow()" />
if里面的等于号是要两个等于号的,还有是true
if (choose==true)
是true不是ture
if (choose==ture)