摘要: encodeURIComponent('中国人') ==>"%E4%B8%AD%E5%9B%BD%E4%BA%BA"encodeURI('中国人'); ==>"%E4%B8%AD%E5%9B%BD%E4%BA%BA"区别(参考资料--W3Cschool.com):encodeURIComponent() 函数 与 encodeURI() 函数的区别之处,前者假定它的参数是 URI 的一部分(比如协议、主机名、路径或查询字符串)。因此 encodeURIComponent() 函数将转义用于分隔 URI 各个部分 阅读全文
posted @ 2013-08-02 16:08 龙则 阅读(288) 评论(0) 推荐(0) 编辑