开发者

How to get xhr object from $.load function?

A user click a button that makes a request and then click aga开发者_如何学Pythonin and again and again...

I wanted to use xhr.abort(), but I don't know if I can retrieve it from $.load.

Is it possible?


If you want it for an abort, you should perhaps use $.get() instead.

var xhr = $.get('url', function(response) {
    $('#myElement').append( response );
});

xhr.abort();
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜