On the use of the IFRAME mark---the effect of "painting in painting"
Developer on Alibaba Coud: Build your first app with APIs, SDKs, and tutorials on the Alibaba Cloud. Read more ＞
Throughout the current site, the original speed is a little slow, but almost every page to put what banner, column pictures, copyright, such as a lot of similar things, of course, for the unity of the website style, the need for advertising effect, this is understandable, but after all, let the user's wallet for these "embellishment" of things "increasingly lost money gaunt", Is there a way to let these same things download once after downloading, but only to download the content has changed the content of the page?
The answer is yes: Apply the IFRAME tag!
I. The use of the IFRAME tag
If you bring up an IFRAME, you may have already thrown it into the "forgotten Corner", but speaking of its brother frame will not be unfamiliar. The frame tag, which we call the multiple frame structure, is the display of multiple HTML files in a browser window. Now, we have a very realistic situation: if there is a tutorial, is a section of the ground, at the end of each page to do a "previous", "Next" link, in addition to each tutorial content is different, the other part of the page is the same, if a page to do stupid page, this seems to be too boring, when the whim, If there is a way to keep the rest of the page unchanged, just make the tutorial a page-by-page content page, does not contain other content, click the page up and down the link, only change the content of the tutorial, the other remains unchanged, so that one is time-saving, the other after the tutorial has a happens changes, but also very convenient, not in the lead and move the whole army; More important is that those ads banner, column list, navigation and so on almost every page of things only download once and then no longer download.
An IFRAME tag, also known as a floating frame tag, that you can use to embed an HTML document in an HTML display. It differs from the biggest feature of the frame tag that the HTML file referenced by this tag is not displayed independently of the other HTML file, but can be embedded directly in an HTML file, merging with the content of the HTML file, and becoming a whole, in addition, You can also display the same content multiple times on one page without having to repeat the content, an image metaphor is "picture in picture" TV.
Now let's talk about the use of the IFRAME tag.
The use format of the IFRAME tag is:
SRC: The path of the file, both HTML files, but also can be text, ASP, etc.
width, height: "Painting in the picture" area of the width and height;
Scrolling: When the specified HTML file in SRC does not show up in the specified area, the scrolling option, if set to No, the scroll bar does not appear, for auto: The scroll bar appears automatically;
Frameborder: The width of the area border, which is often set to 0 in order for the picture to be merged with the adjacent content.
Mutual control between the parent form and the floating frame
In the scripting language and object hierarchy, the window that contains the IFRAME we call the parent form, and the floating frame is called a subform, it is important to understand the relationship between the two, because in order to access the subform in the parent form or the opposite, you must know the object hierarchy to access and control the form programmatically.
This article is an English version of an article which is originally in the Chinese language on aliyun.com and is provided for information purposes only. This website makes no representation or warranty of any kind, either expressed or implied, as to the accuracy, completeness ownership or
reliability of the article or any translations thereof. If you have any concerns or complaints relating to the article, please send an email, providing a detailed description of the concern or
complaint, to firstname.lastname@example.org. A staff member will contact you within 5 working days. Once verified, infringing content will be removed immediately.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
and provide relevant evidence. A staff member will contact you within 5 working days.