function addNewPrice() { var data = {}; data.revitAddInId = $("#revitAddInId").val(); data.period = $(".periodSelector").val(); data.money = $("#money").val(); if (data.money.length==0 || isNaN(data.money)){ alert("钱不能为空,且要为数字"); return false; } data.srevitAddInName = $(this).data("name"); //datas.push(data); //console.log(JSON.stringify(datas)); $.ajax({ url : ctx + '/revitAddIn/addPrice.html', type : "POST", contentType : "application/json", data : JSON.stringify(data), dataType : 'json', success : function(data) { if (data.success) { location.href =ctx+ "/XX/enterPriceEdit.html?reivtAddInId="+$("#revitAddInId").val()+ "&revitAddInName="+$("#revitAddInName").val(); } } }); 后端使用requestbody 对象接收