使用frameset关闭窗口
在框架页面中,可以使用如下代码关闭页面
<html><head><title>模版</title> <script type="text/javascript"> function closeWin(){parent.window.opener=null;parent.window.close();} </script></head><body><input type="button" value="关闭按钮" onclick="closeWin()"/></body></html>
解决方案二
<html><head><title>模版</title> <script type="text/javascript"> function closeWin(){window.top.close();} </script></head><body><input type="button" value="关闭按钮" onclick="closeWin()"/></body></html>