中文转码

341 阅读1分钟
escape,encodeURI,encodeURIComponent,相应3个解码函数:unescape,decodeURI,decodeURIComponent

ios 在用webview用URL传参时,如果带有中文的字段会返回404,中文字段需要用decodeURIComponent 这个进行转码