var str='我爱你!中国'; encodeURIComponent(str); //接收时无需解码 转载于:https://www.cnblogs.com/wangjinpeng/archive/2010/12/17/1909207.html