<button onclick="openWin()">Open</button>
<button onclick="closeWin()">Close</button>
<script>
var myWindow;
function openWin() {
myWindow = window.open("http://www.google.com", "_blank", "width=500, height=500");}
function closeWin() {
myWindow.close();}
</script>
我在window.open ...
中输入网址时无法关闭任何想法???
非常感谢!!!!!!
答案 0 :(得分:0)
myWindow = window.open("http://www.google.com", "width=500, height=500");