Iframe tag is also called floating frame tag, you can use it to embed an HTML document in an HTML. It is different from the maximum feature of the Frame tag, that is, the HTML file referenced by this mark is not independently independent of the other HTML file, but can be embedded in an HTML file, integrated with this HTML file, and becomes a whole, You can also display the same content in a page multiple times without having to write content, and a metaphor of an image is "painting" TV.
The use format of the iframe tag is:
Mutual control between the parent form and the floating frame In the scripting language and the object level, the window containing iframe we call the parent window, and the floating frame is called a sub-form, which is important to clarify the relationship between the two. Because you want to access a child form or instead in a parent form, you must clear the object level to access and control the form.
1. Access in the parent form and control the object in the child form in the parent form, iframe is a sub-object of the Document object, which can access the object in the subform directly in the script.
There is a problem now, how do we control this iframe, here you need to talk about the iframe object. When we set the ID attribute to this mark, you can control the HTML included by the IFRAME through the document object model DOM.
For example, in the example.htm file in the test.htm file and control some tag objects in Test.htm:
2. Access to the child form and control the object in the parent form In the child form. We can access objects in the parent window through its Parent, parent (diverse) object. Such as eXample.htm: