没办法,运维会一点点前端,还是有好处的。。
说不定,BOOTSTRAP也得会一点点。。
本想用流式输出的搞定的,但没搞定,就取巧了。。。
代理简单:
<script src="///ajax/libs/jquery/1.11.2/jquery.min.js"></script><script src="///ajax/libs/twitter-bootstrap/3.3.2/js/bootstrap.min.js"></script><script>$(document).ready(function(){setInterval(function() {$("#div1").load("/import_html");}, 5000);});</script>
后面效果:
有兴趣的,可以加个按钮触发,类似如下:
<script>$(document).ready(function(){$("button").click(function(){$("#div1").load("/try/ajax/demo_test.txt");});});</script></head><body><div id="div1"><h2>使用 jQuery AJAX 修改文本内容</h2></div><button>获取外部内容</button>