在线UrlEncode批量编码/UrlDecode批量解码

<!DOCTYPE html><html lang="zh-cn"><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1"><title>UrlEncode批量编码/UrlDecode批量解码 - 在线工具</title><meta name="baidu_union_verify" content="c7b1ed99149de450b9aa90606afb8b1c"><meta name="description" content="在线工具提供url批量解码编码,结果支持一键导出,使用js最基本的函数encodeURI,decodeURI,encodeURIComponent,decodeURIComponent来实现本工具"><meta name="keywords" content="URL编码解码,UrlEncode编码,UrlDecode解码,encodeURIComponent编码,decodeURIComponent解码,批量,在线工具"><link rel="shortcut icon" href="/static/images/favicon.ico" /><link rel="bookmark" href="/static/images/favicon.ico" /><link rel="stylesheet" href="http://cdn.bugscaner.com/tools/css/bootstrap.min.css"><link rel="stylesheet" href="/static/css/main2.css"><link href="http://cdn.bugscaner.com/tools/css/toastr.min.css" rel="stylesheet"><!--[if lt IE 9]><script src="http://cdn.bootcss.com/html5shiv/3.7.2/html5shiv.min.js"></script><script src="http://cdn.bootcss.com/respond.js/1.4.2/respond.min.js"></script><![endif]--><style>.toast-center-center{top:40%;left:50%;margin-top:-30px;margin-left:-150px;}</style></head><body><header id="header"><nav class="navbar navbar-inverse navbar-fixed-top" role="navigation"><div id="top-header">在线工具</div><div class="container"><div class="navbar-header"><button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar"><span class="sr-only">Toggle navigation</span><span class="icon-bar"></span><span class="icon-bar"></span><span class="icon-bar"></span></button><a class="navbar-brand" href="/" title="在线工具">在线工具</a></div><div id="navbar" class="collapse navbar-collapse"><ul class="nav navbar-nav"><li><a href="/sniffer/" title="识别类工具">识别类工具</a></li><li><a href="/encodeanddecode/" title="疯狂加解密">疯狂加解密</a></li><li><a href="/webmaster/" title="站长工具">站长工具</a></li><li><a href="/seo/" title="SEO工具">SEO工具</a></li><li><a href="/text/" title="文本字符串处理工具大全">文本/字符串</a></li><li><a href="/torrentandmagnet/">BT/磁力相关</a></li><li><a href="/qitagongju/">其他工具</a></li></ul></div></div></nav></header><div class="container"><div style="margin-top:110px;"><hr><div class="row text-center" style="margin-top:30px;margin-bottom:20px;"><div class="col-md-12"><h3>在线UrlEncode批量编码/UrlDecode批量解码</h3></div></div><div style="padding-bottom:20px"><div class="form-group text-center"><label class="radio-inline"><input type="radio" value="1" name="code" checked><span data-toggle="tooltip" title="该方法不会对 ASCII 字母和数字进行编码,也不会对这些 ASCII 标点符号进行编码: - _ . ! ~ * ' ( ) 。">encodeURI</span></label><label class="radio-inline"><input type="radio" value="2" name="code"><span data-toggle="tooltip" title="该方法不会对 ASCII 字母和数字进行编码,也不会对这些 ASCII 标点符号进行编码: - _ . ! ~ * ' ( ) 。其他字符(比如 :;/?:@&=+$,# 这些用于分隔 URI 组件的标点符号),都是由一个或多个十六进制的转义序列替换的。">encodeURIComponent</span></label></div></div><div class="row"><div class="col-md-12"><textarea class="form-control" rows="10" id="content" placeholder="请在这里输入您需要批量编码Url或者需要解码的Url,一行一个"></textarea></div></div><div class="row" style="margin-top:20px"><div class="col-md-12 text-center"><label>中文编码:</label><select name="bianma" id="bianma"><option value="1" selected="selected">UTF8</option><option value="2">GBK</option></select><button type="submit" class="btn btn-danger bugscaner" id="encode" style="margin:5px;">编码</button><button type="submit" class="btn btn-danger bugscaner" id="decode" style="margin:5px;">解码</button><button type="submit" class="btn btn-primary" id="copy" data-clipboard-target="#shuchu">复制结果</button><button type="submit" class="btn btn-primary" id="btn2" style="margin:5px;">导出文本</button><button type="submit" class="btn btn-primary" id="btn3" style="margin:5px;">清空结果</button></div></div><div class="row" style="margin-top:20px"><div class="col-md-12"><textarea class="form-control" rows="10" id="shuchu" placeholder="结果区域"></textarea></div></div><a onfocus="this.blur();" download="bugscaner-UrlEncode批量编码UrlDecode批量解码.txt" id="createInvote" class="ipt-todo hide">导出结果</a><div id="item-box"></div><div class="item-box"><h3>在线工具介绍</h3><hr><div class="view-box"><p>encodeURI和encodeURIComponent</p><p>1、如果你需要编码整个URL,然后需要使用这个URL,那么用encodeURI。</p><p>2、当你需要编码URL中的参数的时候,那么encodeURIComponent是最好方法。</p><p>encodeURI:该方法不会对 ASCII 字母和数字进行编码,也不会对这些 ASCII 标点符号进行编码: - _ . ! ~ * ' ( ) 。</p><p>encodeURIComponent:该方法不会对 ASCII 字母和数字进行编码,也不会对这些 ASCII 标点符号进行编码: - _ . ! ~ * ' ( ) 。其他字符(比如 :;/?:@&=+$,# 这些用于分隔 URI 组件的标点符号),都是由一个或多个十六进制的转义序列替换的。</p></div></div><div class="item-box"><h3>应用场景</h3><hr><div class="view-box"><p>批量处理URL编码解码,可以批量导出</p></div></div><div class="item-box"><h3>更新日志</h3><hr><div class="view-box"><p>2018年8月9号上线</p><p>2021年6月1号:新增了UrlEncode GBK编码解码的功能</p></div></div></div></div><footer class="tools-footer"><div class="container"><p>相关站点:</p><ul class="tools-footer-links"><li><a href="http://whois.bugscaner.com" target="_blank" title="whois查询">Whois查询</a></li><li><a href="http://whatweb.bugscaner.com" target="_blank" title="CMS指纹识别">CMS指纹识别</a></li><li><a href="http://icp.bugscaner.com" target="_blank" title="icp备案查询">icp备案查询</a></li><li><a href="http://dns.bugscaner.com" target="_blank" title="同ip网站查询">同ip网站查询</a></li><li><a href="mailto:bugscaner@qq.com" target="_blank" title="联系我们" rel="nofollow">联系我们</a></li></ul><p>我们的热爱能走多远?直到走别人的路,变成自己的路!</p><p>本项目采用 <a rel="license" href="https://docs.djangoproject.com/en/1.11/releases/1.11/" rel="nofollow" target="_blank" data-toggle="tooltip" title="django,一款极易上手的开源框架,会写python 函数就会开发网站,如果因为本站能激发您对python学习的兴趣,真是荣幸之至!">Django 1.11</a>开源框架开发 Copyright? 2010-2018</p></div></footer><script src="https://s1.pstatp.com/cdn/expire-1-M/jquery/1.11.1/jquery.min.js"></script><script src="http://cdn.bugscaner.com/tools/js/bootstrap.min.js"></script><script src="http://cdn.bugscaner.com/tools/js/toastr.min.js"></script><script type="text/javascript">$(function () {$("[data-toggle='tooltip']").tooltip();});toastr.options.positionClass ='toast-center-center';</script><script src="/static/js/clipboard.min.js"></script><script src="http://cdn.bugscaner.com/static/js/gbk.min.js"></script><script type="text/javascript">function Trim(str)
{return str.replace(/(^\s*)|(\s*$)/g,"");}
function isEmpty(obj){if(typeof obj =="undefined" ||obj ==null ||obj ==""){return true;}else{return false;}
}
$(".bugscaner").click(function() {document.getElementById('shuchu').value ="";var button_name =$(this).attr("id");var bianma =$("#bianma").val();var inputcontent =document.getElementById('content').value;var leixing =$("input[name='code']:checked").val();if(isEmpty(inputcontent)){toastr.warning("请随便输入点什么老哥,");return;}
var arr =inputcontent.split('\n');var jieguo =new Array();for (j =0;j < arr.length;j++) {var trimstr =Trim(arr[j]);if (!isEmpty(trimstr)) {if(button_name =="encode"){if (leixing="1"){if(bianma ==1){var newstr =encodeURI(trimstr);}else{var newstr =GBK.URI.encodeURI(trimstr);}
}
else{if(bianma ==1){var newstr =encodeURIComponent(trimstr);}else{var newstr =GBK.URI.encodeURIComponent(trimstr);}
}
}else{if (leixing="1"){if(bianma ==1){try{var newstr =decodeURI(trimstr);}
catch(err){var newstr =trimstr+"------>"+"解码失败,请选择GBK编码解码试试";}
}else{try{var newstr =GBK.URI.decodeURI(trimstr);}catch(err){var newstr =trimstr+"------>"+"解码失败,请选择UTF8编码解码试试";}
}
}
else{if(bianma ==1){try{var newstr =decodeURIComponent(trimstr);}catch(err){var newstr =trimstr+"------>"+"解码失败,请选择GBK编码解码试试";}
}else{try{var newstr =GBK.URI.decodeURIComponent(trimstr);}catch(err){var newstr =trimstr+"------>"+"解码失败,请选择UTF8编码解码试试";}
}
}
}
} else {var newstr ="";}
jieguo.push(newstr);}
document.getElementById('shuchu').value =jieguo.join("\n");});$("#btn2").bind("click",function() {var daochu =document.getElementById('shuchu').value;if (isEmpty(daochu)) {alert("你还没有编码或解码任何东西,无法导出");return false
}
var isIE =(navigator.userAgent.indexOf('MSIE') >=0);if (isIE) {var winSave =window.open();winSave.document.open("text","utf-8");winSave.document.write(daochu);winSave.document.execCommand("SaveAs",true,"bugscaner.txt");winSave.close();} else {var mimeType ='text/plain';$('#createInvote').attr('href','data:' + mimeType + ';charset=utf-8,' + encodeURIComponent(daochu));document.getElementById('createInvote').click();}
return false
});$("#btn3").bind("click",function() {document.getElementById('content').value ='';document.getElementById('shuchu').value ='';document.getElementById('content').select();return false
});var clipboard =new ClipboardJS('#copy');clipboard.on('success',function (e) {if (e.text !="") {toastr.success("复制成功");}
else {toastr.success("什么都没有,无法复制");}
});clipboard.on('error',function (e) {toastr.success("复制失败");});</script><div style="display: none;"><script>var _hmt =_hmt ||[];(function() {var hm =document.createElement("script");hm.src ="https://hm.baidu.com/hm.js?81c5c6d2c74d56c9ab654aec4c11e078";var s =document.getElementsByTagName("script")[0];s.parentNode.insertBefore(hm,s);})();</script></div><script>(function(){var bp =document.createElement('script');var curProtocol =window.location.protocol.split(':')[0];if (curProtocol ==='https') {bp.src ='https://zz.bdstatic.com/linksubmit/push.js';}
else {bp.src ='http://push.zhanzhang.baidu.com/push.js';}
var s =document.getElementsByTagName("script")[0];s.parentNode.insertBefore(bp,s);})();</script><script src="/static/js/jquery1.11.1.js"></script></body></html>
(0)

相关推荐