因为网站编码是gb2312。在使用prototype的ajax时遇到中文参数乱码的问题。

解决办法:

1.将参数用encodeURI()编码

var myAjx=new Ajax.Request(url,{method: 'get',parameters: encodeURI(par) ,onComplete: submit});
2.接受端代码

接受中文

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-06-07
  • 2022-12-23
  • 2022-12-23
  • 2021-06-12
猜你喜欢
  • 2021-08-17
  • 2021-06-01
  • 2022-02-05
  • 2022-01-18
  • 2022-02-11
  • 2021-10-29
  • 2022-12-23
相关资源
相似解决方案