JS编码地址栏参数及解码地址栏参数

当我们需要传送中文字符时就需要把这些字符进行编码。

decodeURI() 解码某个编码的 URI。 1 5.5
decodeURIComponent() 解码一个编码的 URI 组件(包括#$%@等符号)。 1 5.5
encodeURI() 把字符串编码为 URI。 1 5.5
encodeURIComponent() 把字符串编码为 URI 组件(包括#$%@等符号) 1 5.5

  

posted @ 2012-06-07 08:58  Kop-Elan  阅读(522)  评论(0编辑  收藏  举报