<html>
<head>
<title>Ascii<--> Unicode 编码转换—蚊子弹琴</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<script Language=Javascript>
var classObj=
{
ToUnicode:function(str)
{
return escape(str).replace(/%/g,"\\").toLowerCase();
},
UnUnicode:function(str)
{
return unescape(str.replace(/\\/g, "%"));
},
copyingTxt:function(str)
{
document.getElementById(str).select();
document.execCommand("Copy");
}
}
</script>
</head>
<body align="center">
<h3>Ascii Unicode 编码转换</h3>
<textarea id=codes style="width:500px;height:300px"></textarea><br><br>
<input type=button value="编码" οnclick=javascript:codes.value=classObj.ToUnicode(codes.value)>
<input type=button value="解码" οnclick=javascript:codes.value=classObj.UnUnicode(codes.value)>
<input type=button value=复制文本 οnclick=javascript:classObj.copyingTxt("codes")>
<input type=button value=清空内容 οnclick=javascript:codes.value="">
</body>
</html>
编码解码 Unicode to ascii
最新推荐文章于 2023-10-25 23:30:00 发布