开发者

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

开发者 https://www.devze.com 2022-12-22 05:31 出处:网络
means, do sth, then request using jQuery, like a hook开发者_StackOverflow社区er. How can i do this?Use $.ajaxSetup() for this

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

精彩评论

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