HTML DOM titleProperty

Document 对象参考手册Document Object

Definition and Usage

The title property returns the title of the current document (the text within the HTML title element).

Syntax

document.title


Browser Support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

All major browsers support the title property.


Examples

Examples

Return the title of the current document:

<html>
<head>
<title>My title</title>
</head>
<body>

The title of the document is:
<script>
document.write(document.title);
</script>

</body>
</html>

Try it Yourself »


Document 对象参考手册Document Object Other Extensions