URLexam是一款简单的url编码解码器,用户只需在input中输入需要编码或解码就可得出详细的内容了,主要适用于web开发。软件操作简单,绿色免安装,需要的朋友可以下载!
url编码解码介绍
URL编码:
1,escape:(对应的解码:unescape)
对除了字母、数字、标点符号(@,/,·,+,-,_)以外的内容进行编码, escape 方法不能用来对“统一资源标识符”(URI) 进行编码, 例如:
原URL:
http://localhost:63342/zm_boss_ui/zm_boss_ui/report.html?cardNo=6222620140012450241&name=‘张三三’&identityNo=370686199202056529&mobile=17663849466&indexArray=S0469
编码后:
http%3A//localhost%3A63342/zm_boss_ui/zm_boss_ui/report.html%3FcardNo%3D6222620140012450241%26name%3D%25E9%2583%259D%25E8%2589%25B3%25E7%258E%2589%26identityNo%3D370686199202056529%26mobile%3D17663849466%26indexArray%3DS0469
2,encodeURI:(对应的解码:decodeURI)
编码成统一资源标识符的格式,不会被编码的字符:! @ # $ & * ( ) = : / ; ? + '
编码后:
http://localhost:63342/zm_boss_ui/zm_boss_ui/report.html?cardNo=6222620140012450241&name=%25E9%2583%259D%25E8%2589%25B3%25E7%258E%2589&identityNo=370686199202056529&mobile=17663849466&indexArray=S0469
3,encodeURIComponent:(对应的解码:decodeURIComponent)
不会被此方法编码的字符:! * ( ) '
编码后:
http%3A%2F%2Flocalhost%3A63342%2Fzm_boss_ui%2Fzm_boss_ui%2Freport.html%3FcardNo%3D6222620140012450241%26name%3D%25E9%2583%259D%25E8%2589%25B3%25E7%258E%2589%26identityNo%3D370686199202056529%26mobile%3D17663849466%26indexArray%3DS0469