form 表单使用.serialize()序列化后会出现中文乱码的问题 原因: .serialize()自动调用了encodeURIComponent方法将数据编码了 解决方法: 调用decodeURIComponent(XXX,true);将数据解码 例如: var information=$("#inforForm").serialize(), informationDe= decodeURIComponent(information,true), //解码 information
序列化中文时之所以乱码是因为.serialize()调用了encodeURLComponent方法将数据编码了 解决方法就是进行解码 原因:.serialize()自动调用了encodeURIComponent方法将数据编码了 解决方法:调用decodeURIComponent(XXX,true);将数据解码 //商品标签function tag(url){ var form = $('form').serialize(); //序列化内容 var shuju = decodeURICompon