HTML DOM title attribute
Definition and Usage
title property returns the current title (HTML title element text) document.
grammar
document.title
Browser Support
All major browsers support the title attribute
Examples
Examples
Returns the title of the current document:
<html>
<head>
<title>My title</title>
</head>
<body>
文档的标题为:
<script>
document.write(document.title);
</script>
</body>
</html>
<head>
<title>My title</title>
</head>
<body>
文档的标题为:
<script>
document.write(document.title);
</script>
</body>
</html>
try it"
Document Object