代码改变世界

IOS 8.1 Safari:Jquery $.ajax timeout error dom exception 23

2015-11-16 19:53  SkyBlue  阅读(1462)  评论(0)    收藏  举报
 1 $.ajax({
 2     type: "POST",
 3     url: serviceURL,
 4     data: userInputjson,
 5     contentType: "application/json; charset=utf-8",
 6     datatype: "json",
 7     async: false,
 8     timeout: 20000,
 9     succ:function(){
10 
11     }
12 });

IOS9 自动弹窗的页面会报异常 timeout error exception 23,经查是ajax的同步设置导致的。将async:false改成 async:true或去除async属性即可