$.ajax({ url:'fghjkld', type:'POST', data:{}, timeout:'3000', success:function(data){}, error:function(jqXHR, textStatus, errorThrown){ if(textStatus == 'timeout'){ alert('超时事件!'); } } })
http://stackoverflow.com/questions/5225597/set-timeout-for-ajax-jquery