Document:contentType 属性
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.contentType
只读属性表示返回文档正在渲染的 MIME 类型。这可能来自 HTTP 标头或其他 MIME 信息源,并且可能会受到浏览器或扩展程序执行的自动类型转换的影响。
备注:
该属性不受 <meta>
元素的影响。
值
contentType
是只读属性。
规范
Specification |
---|
DOM # ref-for-dom-document-contenttype① |
浏览器兼容性
Report problems with this compatibility data on GitHubdesktop | mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
contentType |
Legend
Tip: you can click/tap on a cell for more information.
- Full support
- Full support
- 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.