Document.characterSet
Baseline
Widely available
This feature is well established and works across many devices and browser versions. Itâs been available across browsers since 2015ë 7ì.
Document.characterSet ì½ê¸° ì ì© ìì±ì íì¬ ë¬¸ìê° ë ëë§ì ì¬ì©íë 문ì ì¸ì½ë©ì ë°íí©ëë¤.
ì°¸ê³ :
Document.charsetê³¼ Document.inputEncoding ìì±ì Document.characterSetì ì´ì ë³ì¹ì
ëë¤. ë ì´ì ì¬ì©ì§ ë§ì¸ì.
ìì
html
<button onclick="console.log(document.characterSet);">
ì½ìì ì¸ì½ë© ì¶ë ¥
</button>
<!-- "ISO-8859-1"ì´ë "UTF-8" ë±, 문ìì ìºë¦í° ì
ê¸°ë¡ -->
ëª ì¸ì
| Specification |
|---|
| DOM > # ref-for-dom-document-charactersetâ > |