lishupeng

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");

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

分类:

技术点:

相关文章:

  • 2021-11-28
  • 2021-12-23
  • 2021-07-31
  • 2021-12-23
  • 2021-08-02
猜你喜欢
  • 2021-08-02
  • 2021-08-02
  • 2021-08-02
  • 2021-08-02
  • 2021-08-02
  • 2021-10-24
  • 2021-08-02
相关资源
相似解决方案