iframe关闭刷新父页 点击页面里的登录按钮,弹出一个iframe的登录页面,登录验证成功后设置了Session。如何让登录成功后iframe自动关闭,并刷新父页,父页读取Session。 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 frames[index].style.display = "none"<script type="text/javascript"> var identity = +new Date; function doClose() { var frames = window.parent.document.getElementsByTagName("iframe"); for(var index = 0; index < frames.length; index++) { if (frames[index].contentWindow.identity == identity) { frames[index].style.display = "none"; break; } } }</script>或者boxy 刷新父窗体 .window.parent.location.reload(); 可是在Firefox Opera 上iframe刷新父窗口后,父窗口都能读到Session,但就是在IE中读不到。这是怎么回事,需要怎么弄啊? 在弹出的窗口中,用表单把用户信息传递给父窗口。然后window.opener=null;window.close;window.parent.reload(); iframe内的关闭按钮加上 window.parent.reload() 在登录事件 赋值给session后 Session["UserSession"] = result; Response.Write("<script> parent.location.reload();</script>"); login 页面是子页面 用上面那个肯定行的~ detailview绑定dropdownlist出错。 我用的是WIN2003企业版,现在装了.NET2.0,但我的.NET1.1WEB程序不能运行? textbox 50分:求九天音乐的排行榜的解决方案! 在北京,一年工作经验的工资是多少? ■■■遍历windows用户组下面所有用户的奇怪问题 TreeView and can not load fp5autl.dll 问题 救救我吧。。。。。。。。。。。 请教数据库问题——为何DELETE不可删除多航? 关于javascript的一个问题。 关于弹出窗口的关闭 打开子窗口的时候刷新父窗口
var identity = +new Date; function doClose() {
var frames = window.parent.document.getElementsByTagName("iframe");
for(var index = 0; index < frames.length; index++) {
if (frames[index].contentWindow.identity == identity) {
frames[index].style.display = "none";
break;
}
}
}</script>
或者
boxy
window.parent.location.reload();
Response.Write("<script> parent.location.reload();</script>");