文件:characterSet 屬性
Document.characterSet 只讀屬性返回當前渲染文件的 字元編碼。
注意:“字元集”和“字元編碼”是相關但不同的概念。儘管此屬性名為“字元集”,但它實際上返回的是編碼。
值
字串。
示例
js
console.log(document.characterSet);
// document's character encoding, such as "ISO-8859-1" or "UTF-8"
規範
| 規範 |
|---|
| DOM # ref-for-dom-document-characterset① |
瀏覽器相容性
載入中…