<html>
<body>
<input id=txt1 type=textbox />
<input type=button value="ASC II-->Unicode" onclick="c();">
<input type=button value="Unicode-->ASC II" onclick="d();">
<input id=txt2 type=textbox />
<script>
function c()
{
 var s=document.all.txt1.value;
 var i;
 var d="";
 var t="";
 for (i=0; i<s.length; i++)
 {
  t="0000" + s.charCodeAt(i).toString(16);
  d = d + "\\u" + t.substr(t.length-4);
 }
 document.all.txt2.value=d;
}
function d()
{
 var s="";
 eval("s='" + document.all.txt1.value + "';");
 document.all.txt2.value=s;
}
</script>
</body>
</html>

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-05-16
  • 2021-08-12
猜你喜欢
  • 2022-12-23
  • 2021-06-10
  • 2022-12-23
  • 2022-12-23
  • 2022-01-10
  • 2021-09-13
相关资源
相似解决方案