预期服务器返回的数据类型。如果不指定,jQuery 将自动根据 HTTP 包 MIME 信息返回 responseXML 或 responseText,并作为回调函数参数传递,可用值:
“xml”: 返回 XML 文档,可用 jQuery 处理。
“html”: 返回纯文本 HTML 信息;包含 script 元素。
“script”: 返回纯文本 JavaScript 代码。不会自动缓存结果。
“json”: 返回 JSON 数据 。
“jsonp”: JSONP 格式。使用 JSONP 形式调用函数时,如 “myurl?callback=?” jQuery 将自动替换 ? 为正确的函数名,以执行回调函数。
function (XMLHttpRequest, textStatus, errorThrown) { // 通常情况下textStatus和errorThown只有其中一个有值 this; // the options for this ajax request }function (data, textStatus) { // data could be xmlDoc, jsonObj, html, text, etc… this; // the options for this ajax request }
$(document).ready(function() {
jQuery(“#clearCac”).click(function() {
jQuery.ajax({










