Get the character encoding for a document:
encoding = document.characterSet;
Try it Yourself »
The characterSet
property returns the character encoding for a document.
document.characterSet
Type | Description |
String | The document's character encoding. |
document.characterSet
is a DOM Level 3 (2004) feature.
It is fully supported in all modern browsers:
Chrome | Edge | Firefox | Safari | Opera | IE |
Yes | Yes | Yes | Yes | Yes | 11 |
截取页面反馈部分,让我们更快修复内容!也可以直接跳过填写反馈内容!