在html文件引入其它html文件的几种方式
2014-11-11 09:38
246 查看
在html文件引入其它html文件的几种方式
简介:
1.IFrame引入,瞧一下下面的代码
[代码] <IFRAME NAME="content_frame" width=100% height=30 marginwidth=0 marginheight=0 SRC="import.htm" ></IFRAME>
2.<object>方法
[代码] <object style="border:0px" type="text/x-scriptlet" data="import.htm" width=100% height=30></object>
3.Behavior的download方法
[代码]
<span id=showImport></span>
<IE:Download ID="oDownload" STYLE="behavior:url(#default#download)" />
<script>
function onDownloadDone(downDate){
showImport.innerHTML=downDate
}
oDownload.startDownload('import.htm',onDownloadDone)
</script>
纯静态页面只能用上边三种了
如果是动态页面就好办了,可以用include
<!--#include file="test1.asp"-->
如果服务器支持ssi可以用ssi
<!--#include virtual="文件名称"-->
<!--#include file="文件名称"-->
简介:
1.IFrame引入,瞧一下下面的代码
[代码] <IFRAME NAME="content_frame" width=100% height=30 marginwidth=0 marginheight=0 SRC="import.htm" ></IFRAME>
2.<object>方法
[代码] <object style="border:0px" type="text/x-scriptlet" data="import.htm" width=100% height=30></object>
3.Behavior的download方法
[代码]
<span id=showImport></span>
<IE:Download ID="oDownload" STYLE="behavior:url(#default#download)" />
<script>
function onDownloadDone(downDate){
showImport.innerHTML=downDate
}
oDownload.startDownload('import.htm',onDownloadDone)
</script>
纯静态页面只能用上边三种了
如果是动态页面就好办了,可以用include
<!--#include file="test1.asp"-->
如果服务器支持ssi可以用ssi
<!--#include virtual="文件名称"-->
<!--#include file="文件名称"-->
相关文章推荐
- html文件引入其它html文件的几种方法:include方式
- 在HTML文件引入其它HTML文件的几种方法
- 在html文件引入其它html文件的几种方法 无忧脚本
- 在html文件引入其它html文件的几种方法
- 在HTML文件引入其它HTML文件的几种方法
- 在html文件引入其它html文件的几种…
- 在HTML文件引入其它HTML文件的几种方法
- 在HTML文件引入其它HTML文件的几种方法
- 在html文件引入其它html文件的几种方法
- 在html文件引入其它html文件的几种方法
- 在html文件引入其它html文件的几种方法
- 在HTML文件引入其它HTML文件的几种方法
- maven 引入外部jar包的几种方式
- 引入css的几种方式
- 引入CSS样式的几种方式
- maven 引入外部jar包的几种方式
- CSS在HTML文件中的引入方式,浮动和清除浮动
- 几种字符串补“0”(或其它字符)的方式
- 引入其它html文件的方法
- 引入内部文件或外部链接的几种方式