壹、<iframe>中元素的作用
舉如下例子:
<iframe name=a1 width=420 height=330 frameborder=0 scrolling=auto src=URL></iframe>
name:內嵌幀名稱;
width:內嵌幀寬度(可用像素值或百分比);
height:內嵌幀高度(可用像素值或百分比);
frameborder:內嵌幀邊框;
marginwidth:幀內文本的左右頁邊距;
marginheight:幀內文本的上下頁邊距;
scrolling:是否出現滾動條(“auto”為自動,“yes”為顯示,“no”為不顯示);
src:內嵌入文件的地址;
style:內嵌文檔的樣式(如設置文檔背景等);
allowtransparency:是否允許透明;
二、<iframe>使用的方法
1、在<ifame>中可以直接調用src來實現每個固定的頁面的顯示,例如:
<iframe name=a1 width=420 height=330 frameborder=0 scrolling=auto src=URL>
</iframe>
這裏的URL可以是相對路徑,也可以是絕對路徑。
2、超鏈接跳轉到某個<iframe>,只要給<iframe>命名就可以了。例如<iframe width=420
height=330 name=myiframe frameborder=0 src=www.sina.com.cn></iframe>。如果要從某
個網頁上的超鏈接轉到該<iframe>,如下配置就可以:<a href=URL target= myiframe >