介紹一下編碼解碼函數對
1. escape /unescape 主要用於漢字編碼,返回字符的unicode編碼值, 對“+”不能編碼
2. encodeURI / decodeURI 用於對url進行編碼,但對特殊字符如+ ? # @ & 等不能編碼
3, encodeURIComponent /decodeURIComponent 用於對url進行編碼,可以對特殊字符進行編碼
介紹一下編碼解碼函數對
1. escape /unescape 主要用於漢字編碼,返回字符的unicode編碼值, 對“+”不能編碼
2. encodeURI / decodeURI 用於對url進行編碼,但對特殊字符如+ ? # @ & 等不能編碼
3, encodeURIComponent /decodeURIComponent 用於對url進行編碼,可以對特殊字符進行編碼
本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。