qq_慕前端3396908
2019-03-23 10:21
<!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
JavaScript入门篇
739817 学习 · 9566 问题
相似问题