很简单,ajax发送的字符串中带有"Name like '%1212%' or Phone like'%2121%'"类的字符串,
但是后台接收到的却是"Name like '↔12%' or Phone like'!21%'
中间的'%12'换成了'↔'(其实是竖着的箭头,但是打不出来那个符号,所以就写成了横着的'↔'),
'%21'也换成了'!' .
因为是Get请求,所以这可能是浏览器处理的问题,怎么回避这个问题啊?
好像有个方法,现在一时想不起来了,,,急用!
Ajax浏览器

解决方案 »

  1.   

    好像有个方法,现在一时想不起来了,,,急用!
    re:
    encodeURIComponent?encodeURI?
      

  2.   

    你这个代码是什么意思?用在哪?:
    re:
    用在ajax的传递的参数上
    像:xmlhttp.open("POST", "http://192.168.20.17:8080/hm/hmCreate.php", true);
    xmlhttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded;");
    xmlhttp.send("other="+encodeURIComponent(encodeURIComponent('团结')));          
      

  3.   

    传说中有个urlencode  urldecode,忘了怎么用,
      

  4.   

    http://www.cnblogs.com/qiantuwuliang/archive/2009/07/19/1526687.html
      

  5.   

    完美搞定!,多谢小贩

    http://www.cnblogs.com/qiantuwuliang/archive/2009/07/19/1526687.html