ajax进行前台到后台传输,传输方式为POST格式时的参数
2015-11-06 09:00
330 查看
$.ajax({
type :"POST",
async:false,
data : dataInfo,
timeout:300000,
contentType: "application/x-www-form-urlencoded",
url : abc,
dataType:"json",
success : function(response) {
result=response;
},
error : function(XMLHttpRequest, textStatus, errorThrown, data) {
alert("数据有误,请审核!");
}
});
利用POST方式,对应的contentType应该为application/x-www-form-urlencoded
利用GET方式,对应的contentType应该为application/json或者text
type :"POST",
async:false,
data : dataInfo,
timeout:300000,
contentType: "application/x-www-form-urlencoded",
url : abc,
dataType:"json",
success : function(response) {
result=response;
},
error : function(XMLHttpRequest, textStatus, errorThrown, data) {
alert("数据有误,请审核!");
}
});
利用POST方式,对应的contentType应该为application/x-www-form-urlencoded
利用GET方式,对应的contentType应该为application/json或者text
相关文章推荐
- Win10 Mobile正式版将在12月份开始推送:将覆盖更多其他设备
- 第十周项目3-利用二叉树遍历思想解决问题(3)求二叉树b的叶子节点个数
- 第九周项目2 对称矩阵压缩存储的实现与应用
- Hubot Slack CoffeeScript
- 报表设计--分组报表-分组小计
- MVC 向页面传值方式总结
- 第九周项目4-广义表算法库及应用
- 第八周--数据结构--建立顺序串算法库
- uva 11572 ——Unique Snowflakes
- 报表设计--单元格公式-设置实例
- myeclipse破解问题
- datagrid 前端对本地数据进行分页操作
- 第十周 项目3-利用二叉树遍历思想解决问题(1)
- 基本字符串压缩
- SQLServer视图
- 关于ShareSDK for Unity的分享界面修改
- 标题:用kill函数传递信号 int kill(pid_t pid,int sig)
- TabHost页和子Activity之间的通讯
- 页式虚拟存储管理
- 编程免费书Python,C/C++