Movatterモバイル変換


[0]ホーム

URL:


  1. 面向开发者的 Web 技术
  2. Web API
  3. Document
  4. Document:characterSet 属性

此页面由社区从英文翻译而来。了解更多并加入 MDN Web Docs 社区。

View in EnglishAlways switch to English

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 2015年7月.

Document.characterSet 只读属性返回当前渲染文档字符编码

备注:“字符集”和“字符编码”是相关的,但又有所不同。尽管这个属性的名称如此,但它返回的是编码

一个字符串。

示例

html
<button>输出字符编码</button><!-- 在开发控制台中显示文档字符编码,例如“ISO-8859-1”或“UTF-8” -->

规范

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

浏览器兼容性

Help improve MDN

Learn how to contribute

This page was last modified on byMDN contributors.


[8]ページ先頭

©2009-2026 Movatter.jp