[重要通告]如您遇疑难杂症,本站支持知识付费业务,扫右边二维码加博主微信,可节省您宝贵时间哦!

本站演示(直接点击)

本站网址:http://blog.gemin.com.cn/tool/Unicode.asp

<script language=&#34;JavaScript&#34; type=&#34;text/javascript&#34;>
function A2U()
{
//ASCII -> Unicode
if (parseFloat(ScriptEngineMajorVersion() + &#39;.&#39; + ScriptEngineMinorVersion()) < 5.5)
{
alert(&#39;您的脚本引擎版本过低,请升级为5.5以上&#39;);
return;
}
if (txtarea_ascii.value == &#39;&#39;)
{
alert(&#39;文本框中没有代码!&#39;);
return;
}

txtarea_unicode.value = &#39;&#39;;
for (var i=0; i<txtarea_ascii.value.length; i++) { txtarea_unicode.value += &#39;&amp;#&#39; + txtarea_ascii.value.charCodeAt(i) + &#39;;&#39;; } } function U2A() { //Unicode -> ASCII
var code = txtarea_unicode.value.match(/&amp;#(\d+);/g);
if (code == null)
{
alert(&#39;文本框中没有合法的Unicode代码!&#39;);
return;
}
txtarea_ascii.value = &#39;&#39;;
for (var i=0; i<code.length; i++)
txtarea_ascii.value += String.fromCharCode(code[i].replace(/[&amp;#;]/g, &#39;&#39;));
}

function preview()
{
var win = window.open();
win.document.open(&#39;text/html&#39;, &#39;replace&#39;);
win.document.writeln(txtarea_unicode.value);
win.document.close();
}
</script>

<style>
div{<br />
width:100%;<br />
text-align:center;<br />
margin:auto;<br />
}<br />
#div_title{<br />
margin-top:30px;<br />
word-spacing:5px;<br />
font-size:28px;<br />
font-weight:bold;<br />
}<br />
#div_ascii{<br />
margin-top:10px;<br />
margin-bottom:10px;<br />
}<br />
#div_unicode{<br />
margin-top:10px;<br />
margin-bottom:10px;<br />
}<br />
#div_convert{<br />
text-justify:auto;<br />
}<br />
#div_preview{<br />
width:600px;<br />
text-align:right;<br />
}<br />
#div_copyright{<br />
margin-top:10px;<br />
}<br />
textarea{<br />
width:600px;<br />
height:200px;<br />
}<br />
input{<br />
padding-top:5px;<br />
padding-left:10px;<br />
padding-right:10px;<br />
padding-bottom:5px;<br />
}<br />
hr{<br />
height:1px;<br />
width:600px;<br />
}<br />
</style>

&nbsp;
<div id="&quot;div_title&quot;">ASCII / Unicode 编 码 转 换 器</div>
<div id="&quot;div_ascii&quot;"><textarea id="&quot;txtarea_ascii&quot;" name="&quot;txtarea_ascii&quot;" rows="&quot;6&quot;"></textarea></div>
<div id="&quot;div_convert&quot;"><input id="&quot;btn_ascii2unicode&quot;" name="&quot;btn_ascii2unicode&quot;" type="&quot;button&quot;" value="&quot;ASCII" />
<input id="&quot;btn_unicode2ascii&quot;" name="&quot;btn_unicode2ascii&quot;" type="&quot;button&quot;" value="&quot;Unicode" /></div>
<div id="&quot;div_unicode&quot;"><textarea id="&quot;txtarea_unicodetxt&quot;" name="&quot;txtarea_unicode&quot;" rows="&quot;6&quot;"></textarea></div>
<div id="&quot;div_preview&quot;"><input id="&quot;btn_preview&quot;" name="&quot;btn_preview&quot;" type="&quot;button&quot;" value="&quot;预览转换代码&quot;" /></div>
<div id="&quot;div_copyright&quot;">

<hr />

Powered By 老蛤蟆</div>

问题未解决?付费解决问题加Q或微信 2589053300 (即Q号又微信号)右上方扫一扫可加博主微信

所写所说,是心之所感,思之所悟,行之所得;文当无敷衍,落笔求简洁。 以所舍,求所获;有所依,方所成!

支付宝赞助
微信赞助

免责声明,若由于商用引起版权纠纷,一切责任均由使用者承担。

您必须遵守我们的协议,如您下载该资源,行为将被视为对《免责声明》全部内容的认可->联系老梁投诉资源
LaoLiang.Net部分资源来自互联网收集,仅供用于学习和交流,请勿用于商业用途。如有侵权、不妥之处,请联系站长并出示版权证明以便删除。 敬请谅解! 侵权删帖/违法举报/投稿等事务联系邮箱:service@laoliang.net
意在交流学习,欢迎赞赏评论,如有谬误,请联系指正;转载请注明出处: » ASCII / Unicode 编 码 转 换 器

发表回复

本站承接:网站web修改及维护;网站推广(SEM,SEO);软件安装与调试;服务器部署;APP开发与维护;
各财务软件安装调试服务(如,金蝶,用友,管家婆,速达,星宇等);OA系列,客户管理系统,人力资源,超市POS,医药管理等;

立即查看 了解详情