幫忙看下哪錯了,點擊后沒反應,謝謝?。?!
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>close()</title>
? <script type="text/javascript">
?????? function ahou(){
?????????? var mywin=window.open("http://www.xianlaiwan.cn");
????? var win=confirm("guan?");
????? if(win==ture){
??????? mywin.close();? }
??????? else{alert("不關");}
??????? }
? </script>
</head>
<body>
<input type="button" name="button" value="are you sure?" onClick="ahou"/>
</body>
</html>
2016-01-09
函數沒有調用,少了括號--->onclick="ahou()"
if語句里的true寫錯了