---
title: "ajax 超时设置"
author: "endual"
date: "2013-04-10T18:40:48Z"
tags: []
categories: ["Web前端"]
slug: "ajax"
draft: false
lastmod: "2013-04-10T18:40:48Z"
id: 1845322
url: "https://endual.iteye.com/blog/1845322"
---

$.get()   
$.post()   
$.ajax() 

jQuery 提供的Ajax模式下   如何设置timeout设置超时时间呢？？ 

期待回复........ 

自己补充吧！提供给有需要的朋友！   
$.get()与$.post()方法是$.ajax的高级封装！这个我不啰嗦了！   
要设置请求超时可以用全局属性$.ajaxSetup({timeout:5000});   
5秒后放弃请求！ 

$.ajax方法有timeout属性可设置.