首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > Web前端 >

运用frameset关闭窗口

2012-11-19 
使用frameset关闭窗口在框架页面中,可以使用如下代码关闭页面 htmlheadtitle模版/titlescript ty

使用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>

 

热点排行