运行不了,哪里错了?
来个大神~
来个大神~
2019-01-20
按照你的代码,我运行了一下是可以运行的,建议代码格式化一下,不然看起来有点混乱
<!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 a = confirm("是否打开网页");
if(a == true){
var b = prompt("确认打开的网址","http://www.hao123.com/");
if(b != null){
window.open(b,'width=400','height=500','menuber=no','tooblar');
}else{
alert("666666");
}
}else{
alert("888888");
}
}
</script>
</head>
<body>
<input type="button" value="新窗口打开网站" onclick="openWindow()" />
</body>
</html>举报