0
What does document.title do
2 Réponses
+ 7
Accesses the value between the title tags
<head>
<title>Gets this text</title>
</head>
Try to console.log(document.title)
Note: Make sure the page has loaded before you try to access the DOM.
You can also set the value using;
document.title = "Page Title";