這個(gè)哪出問題了
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>close()</title>
? <script type="text/javascript">
? function openur1(){
???? var mywin=window.open("http://www.baidu.com");
???? var mynu=confirm("是否要關(guān)閉窗口");
???? if(mynu==true)
???? {
???????? mywin.close();
???????? alter("已關(guān)閉");
???? }
???? else{
???????? alert("關(guān)閉失敗");
???? }
? }
?
? </script>
</head>
<body>
???? <input name="button" type="button" onClick="openur1()" value="點(diǎn)擊" >
</body>
</html>
2020-06-29
不能這樣用
2020-05-18
alter改成alert