Введение статьи Wulin.com (www.vevb.com): обычно используется преобразование кодирования HTML.
Этот фрагмент кода предоставляется веб -сайтом обучения. var necoding = (function () {function toAscii (str) {return this.tonormal (str) .Replace (/[^/u0000-/u00ff]/g, function () {return Escape (аргументы [0]). Заменить (/(? this.oronormal (str) .Replace (/[^/u0000-/u00ff]/g, function () {return Escape (аргументы [0]). Заменить (/(? str.replace (/(? :) ([0-9a-f] {4}); | (? this.oronormal (str) .replace (/[^/u0000-/u00ff]/g, function () {return Escape (аргументы [0]). Заменить (/(?:%u) ([0-9a-f] {4})/gi, // $ 1)}); Tocss}; console.log (кодирование.toascii (安体)); console.log (encoding.tounicode (安体)); console.log (кодирование. Анормал (安体)); console.log (encoding.tounicode (安体)); console.log (encoding.tounicode (安体)); console.log (кодирование. Анормал (安体)); console.log (encoding.tounicode (安体)); console.log (encoding.tocss ('arial, helvetica, song font, sans-serif'));