ssm框架中.serialize()传递中文乱码问题
解决方案,添加
var params = jQuery("#carApply form").serialize();
params = decodeURIComponent(params, true);
例如js
$("#car_btn").click(function() {
var params = jQuery("#carApply form").serialize();
params = decodeURIComponent(params, true);
//alert(params);
$.ajax({
url : "${APP_PATH}/car",
type : "POST",
data : params,
success : function(result) {
alert(result.msg);
//关闭模态框
$("#carApply").modal('hide');
},
error : function() {
alert("失败!");
}
});
});
浙公网安备 33010602011771号