序列化中文时之所以乱码是因为.serialize()调用了encodeURLComponent方法将数据编码了
解决方法就是进行解码
1 原因:.serialize()自动调用了encodeURIComponent方法将数据编码了
2 解决方法:调用decodeURIComponent(XXX,true);将数据解码
3 例如:
4 var params = jQuery("#formId").serialize(); // http request parameters.
5 params = decodeURIComponent(params,true);