iframe例子
test1.htm
<html>
<body background="test.jpg" >
<iframe src="test2.htm" id="tag" name="tag" allowTransparency="true" width="250" height="200" scrolling="no" frameborder="0">
</iframe>
<iframe src="test3.htm" id="test3" allowTransparency="true" width="450" height="200" scrolling="no" frameborder="0">
</iframe>
</body>
</html>
test2.htm
<html>
<body style="BACKGROUND-COLOR:transparent;">
<table width="50" height="20">
<tr><td>1</td></tr>
<tr><td>2</td></tr>
</table>
</body>
</html>
test3.htm
<html>
<body style="BACKGROUND-COLOR:transparent;">
<table width="50" height="20">
<tr><td>test1</td></tr>
<tr><td>test2</td></tr>
</table>
</body>
</html>
|
Iframe标记的使用格式是:
<Iframe src="URL" width="x" height="x" scrolling="[OPTION]" frameborder="x" name="main"></iframe> src:文件的路径,既可是HTML文件,也可以是文本、ASP等; width、height:"内部框架"区域的宽与高; scrolling:当SRC的指定的HTML文件在指定的区域不显不完时,滚动选项,如果设置为NO,则不出现滚动条;如为 Auto:则自动出现滚动条;如为Yes,则显示; FrameBorder:区域边框的宽度,为了让“内部框架“与邻近的内容相融合,常设置为0。 name:框架的名字,用来进行识别。 |