jquery ajax 参数意义
来源:互联网 发布:linux的touch -r 编辑:程序博客网 时间:2024/06/10 20:54
jquery ajax 参数意义
转载:http://blog.sina.com.cn/s/blog_6da7fcff01014p4j.html
function (XMLHttpRequest) {this; // the options for this ajax request }
cacheBoolean(默认: true) jQuery 1.2 新功能,设置为 false 将不会从浏览器缓存中加载请求信息。completeFunction请求完成后回调函数 (请求成功或失败时均调用)。参数: XMLHttpRequest 对象,成功信息字符串。function (XMLHttpRequest, textStatus) {this; // the options for this ajax request }
contentTypeString(默认: "application/x-www-form-urlencoded") 发送信息至服务器时内容编码类型。默认值适合大多数应用场合。dataObject,String发送到服务器的数据。将自动转换为请求字符串格式。GET 请求中将附加在 URL 后。查看 processData 选项说明以禁止此自动转换。必须为 Key/Value 格式。如果为数组,jQuery 将自动为不同值对应同一个名称。如 {foo:["bar1", "bar2"]} 转换为 '&foo=bar1&foo=bar2'。dataTypeString
预期服务器返回的数据类型。如果不指定,jQuery 将自动根据 HTTP 包 MIME 信息返回 responseXML 或 responseText,并作为回调函数参数传递,可用值:
"xml": 返回 XML 文档,可用 jQuery 处理。
"html": 返回纯文本 HTML 信息;包含 script 元素。
"script": 返回纯文本 JavaScript 代码。不会自动缓存结果。
"json": 返回 JSON 数据 。
"jsonp": JSONP 格式。使用 JSONP 形式调用函数时,如 "myurl?callback=?" jQuery 将自动替换 ? 为正确的函数名,以执行回调函数。
errorFunction(默认: 自动判断 (xml 或 html)) 请求失败时将调用此方法。这个方法有三个参数:XMLHttpRequest 对象,错误信息,(可能)捕获的错误对象。function (XMLHttpRequest, textStatus, errorThrown) {// 通常情况下textStatus和errorThown只有其中一个有值 this; // the options for this ajax request }
globalBoolean(默认: true) 是否触发全局 AJAX 事件。设置为 false 将不会触发全局 AJAX 事件,如 ajaxStart 或 ajaxStop 。可用于控制不同的Ajax事件ifModifiedBoolean(默认: false) 仅在服务器数据改变时获取新数据。使用 HTTP 包 Last-Modified 头信息判断。processDataBoolean(默认: true) 默认情况下,发送的数据将被转换为对象(技术上讲并非字符串) 以配合默认内容类型 "application/x-www-form-urlencoded"。如果要发送 DOM 树信息或其它不希望转换的信息,请设置为 false。successFunction请求成功后回调函数。这个方法有两个参数:服务器返回数据,返回状态function (data, textStatus) {// data could be xmlDoc, jsonObj, html, text, etc... this;// the options for this ajax request }
0 0
- jquery ajax 参数意义
- jQuery ajax - $ajax() 参数详解
- $.ajax()常用参数的设置及其意义
- jQuery.ajax cache参数
- jQuery.ajax() 参数
- jquery .ajax data参数
- JQuery Ajax参数详解
- jQuery ajax参数详解
- jquery ajax参数详解
- 参数 of jQuery.ajax()
- jquery ajax processData 参数
- jquery ajax参数详解
- jquery ajax传递数组参数
- jQuery.ajax(options)的参数
- JQuery ajax批量传递参数
- JQuery 异步实现ajax 参数
- JQuery Ajax WebService传递参数
- jquery ajax参数用法记录
- Jmeter命令行运行实例讲解
- mtk平台fbconfig使用
- thinkphp屏蔽目录问题
- 修改arm开发板时区
- wamp-------#1045 - Access denied for user 'root'@'localhost' (using password: NO)
- jquery ajax 参数意义
- leetcode-389. Find the Difference 字典,查找某个元素a不在list中
- 工具记录
- [转]程序员的十层楼
- checkbox文字和复选框的间距设置
- 为Python 3.5及以上安装Pygame模块
- 感知调用栈
- oracle 用户权限的管理
- OWASP 测试指南 4.0-OWASP 测试项目