码迷,mamicode.com
首页 > 其他好文 > 详细

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

时间:2014-07-22 22:49:54      阅读:254      评论:0      收藏:0      [点我收藏+]

标签:io   art   cti   re   c   div   

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.

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

ECMA5.1中关于encodeURI,decodeURI 和encodeComponentURI,decodeComponentURI的区别,布布扣,bubuko.com

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

标签:io   art   cti   re   c   div   

原文地址:http://www.cnblogs.com/freshcoder/p/3855870.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!