jQuery AJAX timeout 超时问题详解(3)

var conn=new Ext.data.Connection({ url: "../ws/MyService.asmx/test" , timeout : 60000, //自定义超时时间,这里是60秒 (默认30s) autoAbort : false , disableCaching : true , method : "GET" }); var proxy = new Ext.data.HttpProxy(conn); proxy.getConnection().on("requestcomplete" , function (sender, response, options){ //成功,response.status = 200, response.statusText = 'OK' }); proxy.getConnection().on("requestexception" , function (sender, response, options){ //异常,捕捉 esponse.status ( http status code 代码 )和 response.statusText }); var store = new Ext.data.Store({ proxy: proxy, reader: myReader, //需要另外定义一个reader baseParams: {myargument:'myargumentValue' }, //改成你的参数名和值 remoteSort: false }); store.load();

以上所述是小编给大家介绍的jQuery AJAX timeout 超时问题详解的相关知识,希望对大家有所帮助,如果大家有任何疑问请给我留言,小编会及时回复大家的。在此也非常感谢大家对脚本之家网站的支持!

您可能感兴趣的文章:

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/wzsfzx.html