js 中encodeURIComponent转码
var obj;
var posturl = "${serviceurl}/save.shtml?";
var opt = {
async: false,
url : posturl,
type : "post",
data: {
"facePrice": facePrice.toString(),
"salePrice": salePrice.toString(),
"tookPrice": tookPrice.toString(),
"num": num.toString(),
"discountRate": discountRate.toString(),
"tookTotal": tookTotal.toString(),
"deliveryRate": deliveryRate.toString(),
"oldsalePrice": oldsalePrice.toString(),
"oldtookPrice": oldtookPrice.toString(),
"olddiscountRate": olddiscountRate.toString(),
"oldtookTotal": oldtookTotal.toString(),
"olddeliveryRate": olddeliveryRate.toString(),
"prodCode": encodeURIComponent(prodCode.toString()),
"prodName": encodeURIComponent(prodName.toString()),
"state":state,
"isEdit":0,
}, //参数列表
datatype: "json", //返回数据的格式
success : function(data) {
java后台
String prodCodeString = URLDecoder.decode(request.getParameter("prodCode"),"UTF8");