$(function(){
var username = $('#username').html();
var update_userdata = function() {
if (username != '') {
$.ajax({
url: "http://12sky.gxcw.com/code/Handsome/userdata",
success: function (data) {
if (data) {
$('.point_count').text(data.point);
}
}
});
}
}
var loop_update_userdata = function() {
update_userdata();
setTimeout(function(){
loop_update_userdata();
},10000);
}
// 开始自动更新
loop_update_userdata();
});
网友评论