為啥我點擊按鈕時,打開的窗口不關閉呢?
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>close()</title>
? <script type="text/javascript">
? ? ?var mywin=window.open("http://idcbgp.cn");
? ? ?function close(){
? ? ? ? ?mywin.close();
? ? ?}
? </script>
</head>
<body>
? ?<input name="button" type="button" onClick="close()" value="guanbi"/>
</body>
</html>
2016-05-03
function close(){ ? 把close換成其他字符 或者 換成Close?
2016-04-24
另外你換一個函數(shù)名稱,不要用close
2016-04-24
把 var mywin=window.open('http://idcbgp.cn');?放到 function close(){}函數(shù)里面就可以了。
2016-04-22
方法名改成別名字的試試