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 July 2015.
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① |
브라우저 호환성
Report problems with this compatibility data on GitHubdesktop | mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
characterSet |
Legend
Tip: you can click/tap on a cell for more information.
- Full support
- Full support
- Uses a non-standard name.
- Has more compatibility info.
The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.