如何使用jquery刷新ol列表? [英] how to refresh ol list using jquery?
本文介绍了如何使用jquery刷新ol列表?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何使用jquery刷新ol列表?
how to refresh ol list using jquery?
推荐答案
拿一个div。
里面拿Olist。
现在从jquery / ajax获取数据,当你得到数据时,清除div的内容并用新数据动态绑定新的Olist。
Ex清除你的想法...
Take one div.
inside that take Olist.
now get your data from jquery/ajax and when you get the data clear the content of div and bind new Olist dynamically with new data.
Ex to clear your idea...
<div id="MyDiv">
<ol>
<li>
...
...
</li>
</ol>
</div>
现在从ajax获取数据。
Now get data from ajax.
setInterval(function () {
.ajax( {
类型: GET / POST,
url: YourUrl,
dataType: json,
成功:功能(数据){
.ajax({ type: "GET/POST", url: "YourUrl", dataType:"json", success: function(data){
( #MyDiv)。empty();
("#MyDiv").empty();
这篇关于如何使用jquery刷新ol列表?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文