ajax提交到后台是中文乱码

运行程序时遇到用ajax的url中传递数据,后台用request.getParamet()时出现中文乱码

$.ajax({
            type: "POST",   
            url:  g_sBasePath+"restoreaccount/accountRestore.action?accountno=" +accountno,

            success: function(msg){}

解决方法,在ajax的data中把需要传递的数据传递过去,后台获得数据后就不会乱码

$.ajax({
	                type: "POST",   
	                url: g_sBasePath+"restoreaccount/accountRestore.action",
	                data :"array=" + accountno +","+noteex,
	                success: function(msg){
原文地址:https://www.cnblogs.com/qinshou/p/6077794.html