encodeURI("http://www.cnblogs.com/season-huang/some other thing"); //整个URL进行编码
"http://www.a.com?foo="+encodeURIComponent(param);

decodeURI 或 decodeURIComponent

 posted on 2016-06-10 04:46  jayruan  阅读(147)  评论(0)    收藏  举报