10月25

jquery ajax传中文参数 空值无值或乱码解决

| |
20:44 W3C前端技术  From: 本站原创
jquery ajax传中文参数 空值无值或乱码解决

  $.ajax({
  cache: "False",
  type: "GET",
  url: "http://www.tommyhu.cn",
  data: "ft=initregion&par1=321&par2=1&s="+Math.random(),
  success: function(msg){
      alert(msg);
  },
  error: function(){alert("操作错误!");}});


解决方法

escape("中文")
阅读(5489) | 评论(0) | 引用(0)
在此留下酱油瓶-:)
表情
emotemotemotemotemotemotemotemotemotemotemotemotemotemotemotemot
打开HTML
打开UBB
打开表情
隐藏
记住我

您的大名(例如:小明) : 

密码(可不填) :  游客无需密码

网址 (可不填) : 

电邮 (可不填) :  [注册]