AJAX(三)jQuery AJAX.post
来源:互联网 发布:软件的系统架构 编辑:程序博客网 时间:2024/06/09 16:13
在jQuery 中也提供了一个比较简单的ajax请求jQuery.post(url, [data], [callback],[type]),如果考虑出错时执行函数该方法不适合,请选择ajax
相对jQuery .AJAX方法jQuery.post更加简单但是执行函数少了很多,而且jQuery.post请求都是post
这个方法没ajax那么多方法,只有4个属性,
url:发送请求地址。
data:待发送 Key/value 参数。
callback:发送成功时回调函数。
type:返回内容格式,xml, html, script, json, text, _default。
<!DOCTYPE html><html xmlns="http://www.w3.org/1999/xhtml"><head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title></title> <script src="jquery-1.11.0.min.js"></script> <script> $(function () { $.post("xx.ashx", { "name": "name", "age": 1 }, function (msg) { alert(msg) },'text'); }); </script></head><body></body></html>
0 0
- AJAX(三)jQuery AJAX.post
- jQuery $.post $.ajax用法
- JQuery Ajax Post实例
- jQuery $.post $.ajax用法
- jquery ajax post get
- jQuery ajax --post() 方法
- jQuery ajax - post() 方法
- jQuery $.post $.ajax用法
- JQuery ajax post使用
- jquery ajax post传值
- JQuery Tutorial | AJAX POST
- jQuery $.post $.ajax用法
- jQuery ajax - post() 方法
- jQuery $.post $.ajax用法
- jQuery $.post $.ajax用法
- jQuery $.post $.ajax
- jQuery $.post $.ajax用法
- jQuery $.post $.ajax用法
- 如何去掉数字字符串里面的特殊字符
- Android导入错误 Invalid project description
- 非科班出身的人学习编程不负责任指南
- 手机WEB页面,调用手机拨号和发短信
- HDU 5505 GT and numbers(gcd)
- AJAX(三)jQuery AJAX.post
- 剑指offer第二十四题【二叉树中和为某一值的路径】c++实现
- 各种距离(转)
- VBS中传值与传址的区别
- oracle中的函数之单行函数
- DX2.0缩略图类class_image.php
- ubuntu14.01 下python3.4 链接mysql数据库
- Linux Security Module Framework
- 火狐书签扩展应用Pocket:漏洞挖掘没那么难