실시간 refresh jquery+ajax
Posted by Albert 4874Day 16Hour 27Min 41Sec ago [2011-12-15]
function Timer()
{
var timeout = 30000;
setTimeout(function() {
$.ajax({
url: "urltofile",
type: "POST",
success: function(response)
{
[....] // do stuff with the response
Timer(); // set new instance for timer after the response
}
});
},
timeout);
}
//
Timer();