开发者

Before every ajax request using jQuery, I want to do sth

means, do sth, then request using jQuery, like a hook开发者_StackOverflow社区er. How can i do this?


Use $.ajaxSetup() for this

Full documentation here

For example:

$.ajaxSetup({
    beforeSend: function() {
       //do something, like show 'Requesting....'
    }
});
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜