今天做办公用品管理系统时,发现需要用到在一个静态页面html 中调用多个静态页面html的内容。查找资料总结了以下一些方法:
一、iframe引入的方法
代码如下:
<!-- 部门--> <div class="tab-pane fade in active" id="depart"> <IFRAME SRC="comAdmin_basic_depart.html" frameborder="0" width="800px" height="800px"></IFRAME> </div> <!-- 物品分类--> <div class="tab-pane fade" id="goodssorts" > <IFRAME SRC="comAdmin_basic_goodssorts.html" frameborder="0" width="800px" height="800px"></IFRAME> </div> <!-- 计量单位--> <div class="tab-pane fade" id="measurement" > <IFRAME SRC="comAdmin_basic_measurement.html" frameborder="0" width="800px" height="800px"></IFRAME> </div>
二、object 方式
<object style="border:0px" type="text/x-scriptlet" data="import.htm" width=100% height=30></object>
三、 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>