AJAX Post后中文接收显示的乱码问题解决方法:

使用escape() 函数
解决方法很简单:使用javascript中的 escape(string) 函数
http_request.open("POST",url,true);
http_request.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
http_request.send("action="+strName+"&val="+escape(val)); //val的值为中文不会产生乱码

相关文章:

  • 2022-12-23
  • 2021-05-28
  • 2021-10-02
  • 2021-05-28
  • 2021-09-24
  • 2022-01-30
  • 2022-12-23
猜你喜欢
  • 2021-07-15
  • 2021-10-25
  • 2021-12-24
  • 2022-01-07
  • 2022-12-23
  • 2022-12-23
  • 2021-04-08
相关资源
相似解决方案