Movatterモバイル変換


[0]ホーム

URL:


  1. Web
  2. Web APIs
  3. Document
  4. characterSet

Document: characterSet property

Baseline Widely available

This feature is well established and works across many devices and browser versions. It’s been available across browsers since July 2015.

TheDocument.characterSetread-only property returns thecharacter encoding of thedocument that it's currently rendered with.

Note:A "character set" and a "character encoding" are related, but different. Despite thename of this property, it returns theencoding.

Value

A string.

Examples

js
console.log(document.characterSet);// document's character encoding, such as "ISO-8859-1" or "UTF-8"

Specifications

Specification
DOM
# ref-for-dom-document-characterset①

Browser compatibility

Help improve MDN

Learn how to contribute

This page was last modified on byMDN contributors.


[8]ページ先頭

©2009-2026 Movatter.jp