<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
</head>
<script type="text/javascript">
function openWindow(){
var a=confirm("是否打开新窗口?");
alert("bbb")
if(a==ture){
alert("aaa");
var www=prompt("请输入网址:","http://www.imooc.com");
if(www==null){
document.write("拜拜!");
}
else{
window.open(www,"_blank","width=400,height=500,menubar=no,toolbar=no");
}
}
else{
document.write("拜拜!");
}
}
if(a==ture){
这里面的ture拼错了 应该是true