My application 开发者_如何转开发is a real-time apps using ajax environment. It is a live picking of schedule. The users want see the available slot in real-time way. such that they can see other ticking schedule. And i'm using ajax to replace the element with the new one. Example:
$.get(my_url, function(data){ $('#area').innerHTML(data); });
On success the element with an ID 'area' will be replaced with the new generated html response so that it looks 'real-time'.
Use the load()
function
$('#area').load(my_url);
Not sure what you mean by fastest, but the easiest is this:
$('#area').load(my_url);
Which does the same thing your $.get
request does.
精彩评论