open()对象
open()对象中,为什么我新建的空窗口仅能打开一次?绑定了点击事件,点击一次后会弹出窗口,关闭窗口后第二次点击就不再起作用?
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Document</title>
</head>
<body>
<script>
var yidong;
function yidong(){
var w=200;
var h=200;
var x=(screen.width-w)/2;
var y=(screen.height-h)/2;
var str='top='+y+',left='+x+',width='+w+',height='+h;
yidong=open('','',str)
}
</script>
<input type="button" id="cic" value="点击打开" onclick="yidong()">
</body>
</html>