我对照别人的语句检查,应该是没错的,符号应该也是没错的,但是点击还是没反应,还有哪里错了呢?
<!DOCTYPE html>
<html>
<head>
<title> new document </title>
<meta http-equiv="Content-Type" content="text/html; charset=gbk"/>
<script type="text/javascript">
function openWindow() {
var openNew = comfirm("是否在新窗口打开网址?");
if (openNew == true) {
var webURL = prompt("请输入你想打开的网址","http://www.imooc.com/");
if (webURL != null) {
window.open(webURL,"_blank","width=400,height=500,menubar=no,toolbar=no");
} else {
alert("Bye Bye!");
}
} else {
alert("Bye Bye!");
}
}
</script>
</head>
<body>
<input type="button" value="新窗口打开网站" onclick="openWindow()" />
</body>
</html>