html中能不能像asp中一样使用include?

或者有什么方法可以代替?
---------------------------------------------------------------

1.IFrame引入,看看下面的代码

[代码]

1<iframe height="30" marginheight="0" marginwidth="0" name="content_frame" src="import.htm" width="100%"></iframe>

你会看到一个外部引入的文件,但会发现有一个类似外框的东西将其包围,可使用
[代码]

1<iframe frameborder="0" height="30" marginheight="0" marginwidth="0" name="content_frame" src="import.htm" width="100%"></iframe>

但你会发现还会有点问题,就是背景色不同,你只要在引入的文件import.htm中使用相同的背景色也可以,但如果你使用的是IE5.5的话,可以看看这篇关于透明色的文章 如果想引入的文件过长时不出现滚动条的话在import.htm中的body中加入scroll=no

 1<object>方式   
 2  
 3[代码] <object data="import.htm" height="30" style="border:0px" type="text/x-scriptlet" width="100%"></object>   
 4  
 5  
 63.Behavior的download方式   
 7  
 8[代码]   
 9<span id="showImport"></span>
10<ie:download id="oDownload" style="behavior:url(#default#download)"></ie:download>
11<script>   
12function onDownloadDone(downDate){   
13showImport.innerHTML=downDate   
14}   
15oDownload.startDownload('import.htm',onDownloadDone)   
16</script></object>
Published At
Categories with Web编程
comments powered by Disqus