关闭iframe中网页的问题 一个主网页里有iframe,点击主网页上的treeview的节点,可以调用网页a,b..等到iframe中显示.网页a,b...上都有关闭的按钮,我的问题是点击关闭按钮只关闭本身的网页,不是关闭整个窗口,如点a网页上的按钮,只关闭a网页,如点b网页上的按钮,只关闭b网页... 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 top.loction.href="close.aspx";close.aspx里面,windon.close(); <input name=btn_close onclick="javascript:parent.parent.window.close()" type="button"> <input type=button onclick="parent.window.close()"> 哦,我理解错误了,点击关闭,整个iframe框架网页都关掉了。是伐?楼主。 <input type=button onclick="parent.window.close()"> 不能单关闭子页面,close是关闭窗口的,你可以使子页面定位在about:blank,用那个框架的href属性赋值. 节点上top.location.href="a.aspx"; a.aspx上的关闭<input type=button value="close" onclick="parent.top.location.href=""> <html><frameset cols="50%,*"> <frame name="left" src="b.html"> <frame name="right" src="a.html" > </frameset> </html><html><head></head><body>aaaaaaaa<input type=button value="close" onclick="parent.right.location.href='about:blank'"></body></html><html><head></head><body>bbbb<input type=button value="close" onclick="parent.right.location.href='a.html'"></body></html> 我的意思是在iframe显示a网页后,a网页调用了b网页,点b网页上的按钮关闭b网页,iframe上还是显示a网页.我现在是在b网页的butoon上用history.back()来处理的,是否有更好的方法. 你可以做一个空白页面 点击关闭时让它跳转到空白页面或者 将iframe的src清空 一种是用history.back()从b回到a另一种就是将iframe的href.location重新定位回a网页.我上面已经写了代码了 用style的display属性就可以解决啊 .net怎么做采集呀··能否给个大致的思路 小型购物网要不要涉及到权限问题 JavaScript问题!高手帮忙啊! DataGrid导出EXCEL问题? 关于VS2005数据库连接的问题? 那位高手指点一下,如何创建角色与权限呀。 可以在非页面类中使用Response和Request对象吗?如何做到? asp.net用户控件初始化定义使用变量为何不行? 如何让dataGrid具有多层表头(有无相应的第三方控件?) 帮帮忙了,思归大哥也来看看吧!!!!!!!!!!!!!!! SqlDataSource里面的selectCommand语句 小弟现在想学习CSS,不知道有什么书好些的
close.aspx里面,windon.close();
<input type=button value="close" onclick="parent.top.location.href="">
<html>
<frameset cols="50%,*">
<frame name="left" src="b.html">
<frame name="right" src="a.html" >
</frameset>
</html><html>
<head></head>
<body>aaaaaaaa
<input type=button value="close" onclick="parent.right.location.href='about:blank'">
</body>
</html><html>
<head></head>
<body>bbbb
<input type=button value="close" onclick="parent.right.location.href='a.html'">
</body>
</html>
或者 将iframe的src清空
一种是用history.back()从b回到a
另一种就是将iframe的href.location重新定位回a网页.我上面已经写了代码了