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

window.document

概述

指向当前窗口内的文档节点.

注: 从Firefox 3和IE7开始,访问其他页面内的文档节点会受到同源策略的影响.

语法

doc = window.document 

参数

  • doc是一个指向document对象的引用

例子

<!DOCTYPE html>
<html>
<head>
   <title>Hello, World!</title>
</head>
<body>

<script type="text/javascript">
   var doc = window.document;
   alert( doc.title);    // 弹出: Hello, World!
</script>

</body>
</html>

规范

文档标签和贡献者

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