JS传递参数时对中文进行编码和解码

var b ="啊,我要过去";
                            var a = encodeURI(b);//对中文编码
                            var c = decodeURI(a);//对中文解码

 

window.localtion.href='www.zuosi.com?a='+a;

posted @ 2015-01-08 18:26  奥巴马说你代码写的好  阅读(1085)  评论(-1编辑  收藏  举报