Document: characterSet-Eigenschaft
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.
Die Document.characterSet
-Eigenschaft (nur lesbar) gibt die Zeichenkodierung des Dokuments zurück, mit der es derzeit gerendert wird.
Hinweis: Ein "Zeichensatz" und eine "Zeichenkodierung" sind verwandt, aber unterschiedlich. Trotz des Namens dieser Eigenschaft gibt sie die Kodierung zurück.
Wert
Ein String.
Beispiele
html
<button onclick="console.log(document.characterSet);">
Log character encoding
</button>
<!-- displays document's character encoding in the dev console, such as "ISO-8859-1" or "UTF-8" -->
Spezifikationen
Specification |
---|
DOM # ref-for-dom-document-characterset① |
Browser-Kompatibilität
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.