刷新iframe [英] Refresh Iframe
本文介绍了刷新iframe的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我可以使用
刷新帧
I can refresh I frame using
frm.location = frm.location
frm.location = frm.location.href
他们俩都工作
但是当位置具有哈希值时,它们不会.
就像url一样:www.codeproject.com(Works)
但是如果url像这样:www.codeproject.com#somehash(不工作)
所以我这样编码
both of them works
but when location has hash they doesnt.
Like if url is like : www.codeproject.com (Works)
but if url is like : www.codeproject.com#somehash (Doesnt work)
So I coded like this
var loc = frm.location.href.split(''#'');
frm.location.href = loc[0];
if (loc[1] != null && loc[1].length > 0) {
frm.document.location.hash = loc[1];
}
但它也不能一直工作.有什么主意吗?
but its also dont work all the time. Any idea ?
推荐答案
嗨
请尝试以下操作:
Hi
Please try following:
document.frames('myInnerFrame').location.reload(true);
如有任何疑问,请告诉我.
如果有帮助,请提供"投票",如果这是正确的答案,请提供"接受答案".:rose:
谢谢,
Imdadhusen
Please do let me know, if you have any doubt.
Please provide "Vote" if this would be helpful, and make "Accept Answer" if this would be correct answer.:rose:
Thanks,
Imdadhusen
这篇关于刷新iframe的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文