代码示例:(标识:jsck_doc_title_1)
<!DOCTYPE html>
<html>
<title>我的标题</title>

<body>
<h1>Document 对象</h1>

<h2>title 属性</h2>

<p>本文档的标题是:</p>

<p id="demo"></p>

<script>
document.getElementById("demo").innerHTML = document.title;
</script>

</body>
</html>
运行结果: