Artikeleinführung von Wulin.com (www.vevb.com): häufig verwendete Codierungskonvertierung von HTML.
Dieser Code -Snippet wird von der Web -Lehrwebsite bereitgestellt. var coding = (function () {function toascii (str) {return this.tonormal (str) .Replace (/[^/u0000-/u00ff]/g, function () {return Escape (Argumente [0]). Ersetzen (/(?:%U) ([0-9a-f] {4})/gi,/$ 1); this.tonormal (str) .Replace (/[^/u0000-/u00ff]/g, function () {return Escape (Argumente [0]). Str.Replace (/(? :) ([0-9a-f] {4}); this.tonormal (str) .Replace (/[^/u0000-/u00ff]/g, function () {return Escape (Argumente [0]). Tocss};}) (); console.log (coding.toascii (安体)); console.log (coding.tounicode (安体)); console.log (coding.tonormal (安体)); console.log (coding.tounicode (安体)); console.log (coding.tounicode (安体)); console.log (coding.tonormal (安体)); console.log (coding.tounicode (安体)); console.log (coding.tocss ('Arial, Helvetica, Song Font, Sans-Serif');