請問把關(guān)閉放在按鈕函數(shù)里面怎么不能執(zhí)行呢
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>close()</title>
? <script type="text/javascript">
? ? ?
? ? ? ? ?var closew=window.open('http://idcbgp.cn','_blank','height=200,width=200');
? ??
? ? function closewin(){
? ? ? ? closew.close();
? ? ? ? }
? </script>
</head>
<body>
? ? <input name="button" type="button" onClick="mywin()" value="點我點我點我">
? ? ? ? <input name="button" type="button" onClick="close()" value="關(guān)掉我">
</body>
</html>
2018-09-28
關(guān)閉命令打錯了,是window.close();
2018-09-28
改成
<input name="button" type="button" onClick="closewin()" value="關(guān)掉我">