jquery序列化表单

没有使用其他的东西 , 数据传送是最基本的。

前台:

var info = $('#dataForm').serialize() ;
alert(decodeURIComponent(info,true))
.serialize()自动调用了encodeURIComponent方法将数据编码了 
解决方法:调用decodeURIComponent(XXX,true);将数据解码 。 
后台:
String s = new String(request.getParameter("name").getBytes("ISO8859-1"), "UTF-8");

这样得到的数据  编码就是对的 。

原文地址:https://www.cnblogs.com/lishupeng/p/5693460.html