Html中引用其他html页面的几种方式

511 阅读1分钟

Html中引用其他html页面的几种方式

1、iframe

<!--下面是第一种方法,用iframe标签引入,为了好看,这里可以将它的border设置为无-->
<iframe src="html/template1.html" width="100%" height="50" frameborder="0"></iframe>

2、object

<object data="html/template2.html" width="100%" height="50" ></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>