Files
itooldog/public/static/script/pcjs/utf8js.js
T
2023-03-22 11:41:09 +08:00

1 line
447 B
JavaScript

function ConvUtf(obj, btn) {
var a = obj.value.replace(/[^\u0000-\u00FF]/g, function ($0) { return escape($0).replace(/(%u)(\w { 4 })/gi, "&#x$2; ") });
hightout(a);
}
function ResChinese(obj, btn) {
var a = unescape(obj.value.replace(/&#x/g, '%u').replace(/; /g, ''));
hightout(a);
}
function Empty() {
document.getElementById("contents").value = "";
$("#result").html('');
document.getElementById("contents").select();
}