Please note, this is a STATIC archive of website developer.mozilla.org from November 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

document.contentType

概述

返回当前文档的Content-Type(MIME)类型.

语法

contentType = document.contentType;

该属性为只读.

备注

该属性的返回值是浏览器检测到的,不一定是直接读取HTTP响应头中的或者HTML中meta标签指定的值.

规范

非标准属性,仅Gecko支持.

文档标签和贡献者

 此页面的贡献者: teoli, khalid32, ziyunfei
 最后编辑者: khalid32,