<IFRAME src = "example.htm" width = "300" heitht = "100"> </iframe>
Example.htm is an embedded page. The tag <IFRAME> has the following available parameter settings:
Marginwidth: The reserved width of the webpage content on the right side of the table. For example, marginwidth = "20", the unit is pix, the same below.
Marginheight: The reserved height of the content on the webpage at the top of the table;
Hspace: the abscissa in the upper-right corner of the page;
Vspace: the vertical coordinate in the upper-right corner of the webpage;
Frameborder: Indicates whether to display the edge. If it is set to "1", it indicates "yes". If it is set to "0", it indicates "no"
Scrolling: Indicates whether a scroll bar is displayed. Enter "1" to indicate "yes", and enter "0" to indicate "no"
Can I embed other files in an htm (HTML) file like a PHP or ASP file? The following describes how to use IFRAME.
The IFRAME element is used to embed a document in a document to create a floating frame. Some of its attributes are described as follows:
Name: name of the embedded Frame
Width: Embedded frame width (available pixel value or percentage)
Height: Embedded frame height (available pixel value or percentage)
Frameborder: Embedded frame border
Marginwidth: The left and right margins of the text in the frame.
Marginheight: the margin of the text in the frame.
Scrolling: Indicates whether a scroll bar is displayed ("Auto" indicates automatic, "yes" indicates display, and "no" indicates not display)
SRC: the address of the embedded file
Style: embedded document styles (such as setting document backgrounds)
Allowtransparency: whether to allow transparency
After the image is uploaded, we can use the following code to display the content of the samper.htm file in main.htmin an embedded frame with a height of 80, a width of 100%, and an automatic display border.
Enable IFRAME to automatically adapt to the content height
<SCRIPT>
Function autoresize ()
{
Try
{
Document. All ["inner" ).style.height?inner.doc ument. Body. scrollheight
}
Catch (e ){}
}
</SCRIPT>
<IFRAME name = "inner" src = "/ADS /? AD = Google & ad2 = biz2008 "marginwidth =" 0 "marginheight =" 0 "frameborder =" 0 "scrolling =" no "width =" 100% "style =" height: expression (1); Aho: expression (autoresize () "> </iframe>