When using $.ajax(), I set the timeout to 3 seconds:
$.ajax({
url: "ajaxTable1.aspx",
cache: false,
error: function(XMLHttpRequest, textStatus, errorThrown) {
//
} ,
success: function(html) {
//
},
timeout: 3000
});
ajaxTable1.aspx page I pass Thread .Sleep(1000 * 5); causes the page to delay execution for 5 seconds before continuing, so the ajax request will time out, but at this moment it will report "Error: The object does not support this operation". I thought there was something wrong with my script at first, but I spent a long time looking for it. No errors were found. Finally, after changing to JQuery-1.3.1, the errors disappeared and the code ran normally. It seems that the new version is not stable yet.