JQuery AJAX Methods

来源:互联网 发布:c linux sleep 编辑:程序博客网 时间:2024/06/05 17:32

JQuery AJAX Methods

$.get()

$.get(URL,data,function(data,status,xhr),dataType)

注意: get方法可以返回缓存的数据。

$.getJSON()

$(selector).getJSON(url,data,success(data,status,xhr))

Post 方法不会缓存数据,用于发送数据请求。

$.post()

$(selector).post(URL,data,function(data,status,xhr),dataType)

ajaxSend / Complete / Success / Error

$(document).ajaxSend(function(event,xhr,options));$(document).ajaxComplete(function(event,xhr,options));$(document).ajaxSuccess(function(event,xhr,options));$(document).ajaxError(function(event,xhr,options,exc));

ajaxStart / Stop

$(document).ajaxStart(function());$(document).ajaxStop(function());

load()

$(selector).load(url,data,function(response,status,xhr))

Http Method
jQuery - AJAX Introduction
jQuery AJAX Methods

原创粉丝点击