公共部分调用

1、  .load 方法

IIS下显示

<div id="head"></div>

<div id="footer"></div>

<script>
$(function(){
  $("#head").load('public/head.html');
  $("#footer").load('public/footer.html');
})
</script>

 ( .load 方法会和 SuperSlide 插件冲突,更适用于静态页面)

2、  object 方法

<object type="text/x-scriptlet" data="public/head.html" width=100% height=40></object>

 3、  include方法

<!--#include file="public/head.html"-->

该方法需把页面后缀改为 .shtml

 

posted @ 2017-12-11 10:44  流萤K  阅读(141)  评论(0编辑  收藏  举报