替代iframe来显示标签内容的更好替代方法? [英] Better alternative to an iframe to display tab content?
问题描述
我有一个带有iframe的页面,其中包含单击的标签的内容.有3个标签和1个iframe.与单击的每个选项卡相关的内容的来源在其他html&中格式化和编码. css文件.
I have a page with an iframe to feature the contents of the clicked tab. There are 3 tabs and 1 iframe. The sources of the contents relating to each tab clicked are formatted and coded in other html & css files.
使用iframe的另一种选择是什么,因为我注意到单击选项卡时,它仍显示白色背景,类似于加载新页面时的情况?
What is another alternative to using an iframe, because I noticed that when the tab is clicked, it still shows the white background, similar to when a new page is loading?
这是我的代码:
<div id="tabs">
<div id="overview">
<a target="tabsa" class="imagelink lookA" href="toframe.html">Overviews</a>
</div>
<div id="gallery">
<a target="tabsa" class="imagelink lookA" href="tawagpinoygallery.html">Gallery</a>
</div>
<div id="reviews">
<a target="tabsa" class="imagelink lookA" href="trframe.html">Reviews</a>
</div>
</div>
<div id="tabs-1">
<iframe src="toframe.html" name= "tabsa" width="95%" height="100%" frameborder="0">
</iframe>
</div>
推荐答案
使用IFRAME加载动态内容(在页面加载后)的唯一替代方法是使用AJAX更新网页上的容器.它非常优雅,通常比将整个页面结构加载到IFRAME中更快.
The only alternative to using IFRAMEs to load dynamic content (after the page has loaded) is using AJAX to update a container on your web page. It's pretty elegant and usually faster than loading a full page structure into an IFRAME.
- 带有JQuery的Ajax (使用此功能,您将喜欢(SO; AJAX功能非常简单)
- 带有原型的Ajax
- > 带有MooTools的Ajax
- > 带有Matt Kruse的AJAX工具箱的独立Ajax (过去,今天使用JQuery是因为我需要一个框架)
- Ajax with JQuery (use this and you will be loved on SO; the AJAX functions are great and simple)
- Ajax with Prototype
- Ajax with MooTools
- Standalone Ajax with Matt Kruse's AJAX toolbox (Used to use this, using JQuery today because I needed a framework)
- AJAX with Dojo (Said to be fast, but AJAX is not as straightforward)
这篇关于替代iframe来显示标签内容的更好替代方法?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!