javascript 对url参数进行编码(解决中文乱码问题)

var str='我爱你!中国';

encodeURIComponent(str); //接收时无需解码

posted @ 2010-12-17 14:03  王金鹏  阅读(476)  评论(0编辑  收藏  举报