This topic created in 5244 days ago, the information mentioned may be changed or developed.
一直没搞明。比如说“你好”,用escape就是“%u4F60%u597D”,用encodeURI就是“%E4%BD%A0%E5%A5%BD”。
具体在应用中有啥例子么,谢谢了。
2 replies • 1970-01-01 08:00:00 +08:00
 |
|
javascript 的 url 编码一律使用 encodeURIComponent ,url 解码一律用 decodeURIComponent ,其他的都不好使,别费劲区分了。
例如:
query = '?a='+encodeURIComponent ('被编码的字符') + '&b=' + encodeURIComponent('★☆◆*㊣');
|