Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
这是我的场景。
那么如何存储请求并在登录后再次触发呢?
也许是这样的?
var request = { url : 'somehandler.php', data : parameters, success: function(){ // handler for success }, error : function(){ // handler for error } };
然后将请求选项存储在变量 request 中,以后可以像这样重复使用:
$.ajax(request);