ECMA5.1中关于encodeURI,decodeURI 和encodeComponentURI,decodeComponentURI的区别

The encodeURI and decodeURI functions are intended to work with complete URIs; they
assume that any reserved characters in the URI are intended to have special meaning and so are not
encoded. The encodeURIComponent and decodeURIComponent functions are intended to work with the
individual component parts of a URI; they assume that any reserved characters represent text and so must be
encoded so that they are not interpreted as reserved characters when the component is part of a complete
URI.

比较清楚的解析了这两对函数的区别。

posted @ 2014-07-20 09:21  aqhjh  阅读(325)  评论(0编辑  收藏  举报