Return the title of the document:
document.title;
Try it Yourself »
Change the title of the document:
document.title = "A new title";
Try it Yourself »
The title
property sets or returns the title of the document.
Return the title property:
document.title
Set the title property:
document.title =
newTitle
Value | Description |
newTitle | The new document title. |
Type | Description |
String | The document title. |
document.title
is a DOM Level 2 (2001) feature.
It is fully supported in all browsers:
Chrome | Edge | Firefox | Safari | Opera | IE |
Yes | Yes | Yes | Yes | Yes | 9-11 |
截取页面反馈部分,让我们更快修复内容!也可以直接跳过填写反馈内容!