使用jquery在特定时间后重复调用Ajax
搜索jquery计时器函数,但我需要一个解决方案,使用jquery每5分钟调用一次下面的ajax函数使用jquery在特定时间后重复调用Ajax,jquery,ajax,Jquery,Ajax,搜索jquery计时器函数,但我需要一个解决方案,使用jquery每5分钟调用一次下面的ajax函数 $.ajax({ type: 'POST', url: '<?php echo base_url().'index.php/score-refresh/scorecard';?>', success: function(html){ $('.score_news').append(html); } }); 您可以使用如下的setInterval调用来
$.ajax({
type: 'POST',
url: '<?php echo base_url().'index.php/score-refresh/scorecard';?>',
success: function(html){
$('.score_news').append(html);
}
});
您可以使用如下的setInterval调用来实现
var timer, delay = 300000; //5 minutes counted in milliseconds.
timer = setInterval(function(){
$.ajax({
type: 'POST',
url: '<?php echo base_url().'index.php/score-refresh/scorecard';?>',
success: function(html){
$('.score_news').append(html);
}
});
}, delay);
您可以使用如下的setInterval调用来实现
var timer, delay = 300000; //5 minutes counted in milliseconds.
timer = setInterval(function(){
$.ajax({
type: 'POST',
url: '<?php echo base_url().'index.php/score-refresh/scorecard';?>',
success: function(html){
$('.score_news').append(html);
}
});
}, delay);
如何在函数刷新后将其替换为旧内容..?使用.html代替.append如何将参数传递给此类型的AJAX内容如何在函数刷新后将其替换为旧内容..?使用.html代替.append如何传递这种ajax类型的参数