扫码关注官方订阅号
window.open测试
不知道为什么会无法关闭标签页,百度了下其他close方法也不行,求解
闭关修行中......
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>window.open测试</title> <script> function openWin(){ myWindow=window.open(",","my","width=400,height=400,top=50,left=10"); myWindow.document.write("<p>这是'我的窗口"); myWindow.document.write("<br>ScreenLeft: " + myWindow.screenLeft); myWindow.document.write("<br>ScreenTop: " + myWindow.screenTop + "</p>"); } function closeWin(){ myWindow.close(); } </script> </head> <body> <input type="button" value="打开 '我的窗口'" onclick="openWin()"> <input type="button" value="关闭窗口" onclick="closeWin()"> </body> </html> 把close()改成closeWin()
微信扫码关注PHP中文网服务号
QQ扫码加入技术交流群
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
PHP学习
技术支持
返回顶部
闭关修行中......