时间:2021-07-01 10:21:17 帮助过:7人阅读
- <br>$(function(){ <br>run(); <br>var interval; <br>function run(){ <br>interval = setInterval(chat,"3000"); <br>} <br>function chat(){ <br>$.post("searchMessage.action",{"mark":"receive","ajax":"ajax"},function(data){ <br>$("span[name='mes']").html(data.num); <br>},"json"); <br>} <br>$("#closeChat").click(function(){ <br>clearTimeout(interval); <br>}); <br><br>}); <br>