jquery向后台传入json数据
来源:互联网 发布:语音随机聊天软件 编辑:程序博客网 时间:2024/05/18 16:18
goodsId = getval.split("&")[1].split("=")[1];
var json = {
"goodsId" : goodsId
};
$.ajax({
type : "POST",
url :"<%=path%>/ShopMyCart/selectMyCartByCondition",
contentType: "application/json; charset=utf-8",
dataType : "json",
/* contentType : "application/json;", */
data : JSON.stringify(json),
dataType: "json",
success : function(data) {
var html = "";
$.each(
data.message,
function(i, m) {
$().html();
$("#hoskeywords").html(m.keyWords);
$("#prepay").html("预付款:"+m.prepay);
$("#productImage").attr("src", m.content);
$("#mount").html("数量:"+m.amount);
$("#phone").html(m.userPhone);
$("#pay").html(m.prepay*m.amount);
$("#hosaddr").html(m.hosDetailedAddr);
$("#buttomprepay").html("¥"+m.prepay*m.amount);
phone = m.userPhone;
prepay = m.prepay;
mount = m.amount;
productId = m.productId;
});
}
});
var json = {
"goodsId" : goodsId
};
$.ajax({
type : "POST",
url :"<%=path%>/ShopMyCart/selectMyCartByCondition",
contentType: "application/json; charset=utf-8",
dataType : "json",
/* contentType : "application/json;", */
data : JSON.stringify(json),
dataType: "json",
success : function(data) {
var html = "";
$.each(
data.message,
function(i, m) {
$().html();
$("#hoskeywords").html(m.keyWords);
$("#prepay").html("预付款:"+m.prepay);
$("#productImage").attr("src", m.content);
$("#mount").html("数量:"+m.amount);
$("#phone").html(m.userPhone);
$("#pay").html(m.prepay*m.amount);
$("#hosaddr").html(m.hosDetailedAddr);
$("#buttomprepay").html("¥"+m.prepay*m.amount);
phone = m.userPhone;
prepay = m.prepay;
mount = m.amount;
productId = m.productId;
});
}
});
0 0
- jquery向后台传入json数据
- jQuery如何向后台传入json格式数据
- jQuery向后台传入json格式数据的方法
- SpringMVC 中向后台传入json数据的问题
- iOS 向后台发送json数据
- iOS向后台发送Json数据
- iOS 向后台发送json数据
- 前台jquery+ajax向后台请求数据,后台返回json,前台显示
- springMVC结合json向后台传送数据(一)
- jQuery中使用ajax向后台传递数据
- ExtJS向后台传入参数与获取后台返…
- JavaScript利用URL向后台传入中文参数乱码
- ajax向后台传递“复合json”参数
- 当向后台插入或读取JSON数据遇见回车时
- 在使用ajax向后台发送json数据,存在格式不正确的问题
- 从jsp中向后台传送json格式数据,浏览器报415 Unsupported media type
- springboot开发中使用postman 向后台传递json数据的时候,为空
- 后台使用@RequestBody接收,anglarJs向后台传递Json数据,报415或400错误
- 图片的类型匹配
- 创建maven modules工程
- Linux下信号量实现进程同步、互斥(生产者消费者问题)
- spring 的ioc原理
- 羊与车的问题
- jquery向后台传入json数据
- 软件开发流程基础常识
- ECMAScript6.0学习之第一篇--let学习
- Linux常用命令
- 用jsp写 不落地式的图片打包下载
- 加载webView 内存泄露 导致内存暴涨的几种解决方案
- Swift3.0 Notification 监控键盘的弹出与收回
- Oracle数据库压缩表空间,进行转移表
- Python读写Excel 2007文件(xlsx)