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("失败!");
				}
			});
		});

  

posted @ 2018-04-26 23:32  丿流年  阅读(169)  评论(0编辑  收藏  举报
TOP