jQuery API | jQuery API 中英文对照版 - jQuery在线查询手册 |
$.ajaxTimeout(time) |
$.ajaxTimeout(time)
Ajax请求超时设定,该设定限制将要进行Ajax请求响应最大需要的时间,如果设置为null或者0即不超时(默认)。 返回值:undefined 参数:
设置Ajax请求超时为5秒钟。 $.ajaxTimeout( 5000 ); Set the timeout of all AJAX requests to a specific amount of time. This will make all future AJAX requests timeout after a specified amount of time. Set to null or 0 to disable timeouts (default). You can manually abort requests with the XMLHttpRequest's (returned by all ajax functions) abort() method. Deprecated. Use $.ajaxSetup instead. Return value: undefined
Example: Make all AJAX requests timeout after 5 seconds. $.ajaxTimeout( 5000 ); |