小白教程
所有教程
关于
Search
172.69.6.207
172.69.6.207
参数设置
贡献
退出
操作
编辑
移动
保护
信息
历史
删除
查看“Prop doc documentmode”的源代码
本页内容
上一节:
Prop_document_documentelement
下一节:
Prop_document_documenturi
因为以下原因,您没有权限编辑本页:
您请求的操作仅限属于该用户组的用户执行:
用户
您可以查看和复制此页面的源代码。
{{DISPLAYTITLE:document.documentMode}}[[Category:dom obj document|16]] = HTML DOM documentMode 属性 = [[dom obj document|Document 对象]] == 定义和用法 == documentMode 属性返回浏览器渲染文档的模式。 IE8 使用不同方式渲染页面,基于 !DOCTYPE 或者某些存在的HTML元素。 这些元素返回值如下: * 5 - 页面在 IE5 模式下展示 * 7 - 页面在 IE7 模式下展示 * 8 - 页面在 IE8 模式下展示 * 9 - 页面在 IE9 模式下展示 '''注意:'''如果没有指定 !DOCTYPE , IE8 以 IE5 模式渲染页面。 == 语法 == <pre> document.documentMode</pre> == 浏览器支持 == documentMode 是 IE 浏览器特定属性,在IE8及之后的IE版本都支持该属性。 返回浏览器渲染页面使用的模式: <sample title="" desc="" lang="html" hererun="1"> <html> <body> This document is displayed in: <script> document.write(document.documentMode); </script> </body> </html> </sample> <run name=""> <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>小白教程(xiaobai.wang)</title> </head> <body> 该文档显示在IE的 <script> document.write(document.documentMode); </script> 模式 <p><b>注意:</b> 仅IE!documentMode 支持 IE8+.</p> <p><b>注意:</b> 如果不是 !指定DOCTYPE,IE8 在IE5模式下渲染页面。 </p> </body> </html> </run> [[dom obj document|Document 对象]]
返回至“
Prop doc documentmode
”。
上一节:
Prop_document_documentelement
下一节:
Prop_document_documenturi