JavaScript窗口对象中的document文档属性

JavaScript窗口对象中的文档属性

此属性包含有关当前文档的信息。

文档属性的语法

window.document

JavaScript文档属性示例

<!DOCTYPE html>

<head>
<title> JavaScript 中的 Window 属性</title>

<h1 style="color: blue">window 对象的 document 属性</h1>
<hr />
</head>
<body>

<script type="text/javascript">
  alert(window.document.title);
</script>
</body>

</html>
日期:2020-04-18 01:09:27 来源:oir作者:oir