如果想实现静态就要拆分页面,严格区分永远静态还是暂时静态的东西
暂时静态的实现方案
test.js
document.write("<!DOCTYPE HTML><html><head></head><body>html内容</body></html>");
调用
<script language="javascript" src="http://localhost/test.js"></script>
静态js好于动态js, 高并发大流量 不会对数据库造成压力
<script type="text/javascript" src="index.php?id=10"></script>
2.框架
<iframe src="?m=comment&c=index&a=init&commentid=content_15-28-1&iframe=1"
width="100%" height="100%" id="comment_iframe" frameborder="0" scrolling="no"></iframe>
3.AJAX随你咯
html为动态 将生成好的html替换区块,常见的有tab选项卡切换
jQuery("#"+tabid+"_sub"+btnid).load("/show/index/a"+(btnid-1)+".html");
这些是静态的基本思路