如何获得这个ajax值#name并将其存储在php变量中?我所做的是把它放在HTML中。获取AJAX值并存储在一个php变量中
<p id="name"></p>
setInterval(function(){
$.ajax({
url:"count.php",
type:"GET",
async:true,
cache:false,
success:function(count)
{
$("#name").html(count);
}
});
},1000);
可能的复制[jQuery的 - 用成功的ajax结果返回值(http://stackoverflow.com/questions/3302702/ jquery-return-value-using-ajax-result-on-success) –