2内部框架具有相同的显示,即使在src不同 [英] 2 iframes with the same display even if the src are different

查看:167
本文介绍了2内部框架具有相同的显示,即使在src不同的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我用这code:

<div class="infobox-pair">
<div class="ibp-left">
    <iframe width="105" height="350" frameborder="0" scrolling="no" style="width: 311px; height: 105px;" marginwidth="0" marginheight="0" name="infobox_flight" id="ibp-left-iframe" src="http://mywebpage.com/paris"></iframe>
</div>
<div class="ibp-right">
    <iframe width="105" height="350" frameborder="0" scrolling="no" style="width: 311px; height: 105px;" marginwidth="0" marginheight="0" name="infobox_package" id="ibp-right-iframe" src="http://mywebpage.com/lisbonne"></iframe>
</div>

这是显示在同一个分区两个不同的内部框架。当我无论显示在浏览器它发生,我可以得到两种不同iframe的内容相同的页面,即使查看源$ C ​​$ C iframe中仍然不同(根据其src和ID)。

That is displaying into the same div two different iframes. When I display the page whatever the browser it happens that I can get the same content for both the iframes even if looking at the source code the iframe are still different (based on their src and id).

这不会发生的100%的时间,我必须刷新有时会多次看到它。

It doesn't happen 100% of the time, I have to refresh sometimes several times to see it.

你有什么线索?

在此先感谢

推荐答案

有一点要记住,当你在IE和其他一些浏览器刷新,浏览器将保留当前SRC =值的iframe,所以,如果你身边的iFrame的驾驶位,然后按F5,每个IFRAME当前最后导航路径尚处于内部框架。是否有可能你导航以某种方式在同一页面?

One thing to keep in mind, when you refresh in IE and some other browsers, the browser will retain the "current" src="" value for iframe, so if you navigated around a bit in the iframes, then hit F5, the current last navigated path for each iframe is still in the iframes. Is it possible you navigated to the same page somehow?

的唯一可靠的方式来获得的iframe复位回其初始值的src上刷新(F5)是使用JavaScript来设置其src作为页面加载事件的一部分。我建议设置在标记初始SRC只是有关:空白和alwyas编程改变它

The only reliable way to get the iframes to "Reset" back to their initial src values on a refresh(f5) is to use javascript to set their src as a part of the page load event. I recommend setting the initial src in markup to just "about:blank" and alwyas programatically change it.

这篇关于2内部框架具有相同的显示,即使在src不同的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆