原因:ajax中url有问题,与后台的参数类型不匹配;例如前端传的参数为字符串,后端为整形
解决办法:排除法,不断更换url筛选错误
参考http://www.xker.com/page/e2009/0116/68445.html
1、 encodeURIComponent(”[string]“) decodeURIComponent(”[encodedString]“)
2、 encodeURI(”[string]“) decodeURI(”[encodedString]“)
3、 escape(”[string]“) unescape(”[encodedString]“)
Note: a、The both of 1 and 2 encodes/decodes in “utf-8″ b、The both of 1 and 2 can not encode _-~*.’ c、The difference of 1 and 2 is 2 can not encoding /?&+=$@,; d、The 3 encodes/decodes in “ISO Latin” 附注:URL编码规则 1、对每个字节进行编码; 2、空格转为”+”号; 3、安全字符不编码。安全字符:大小写英文字母(a-z以及A-Z) 阿拉伯数字(0-9) ’ ( ) * - . _ ! 4、其他字节以十六进制显示并加”%”前缀,例如用%25代表%号。 (编辑:李大同)
【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!
|