0

What does document.title do

9th Apr 2021, 10:57 PM
bgcnhgfjd
bgcnhgfjd - avatar
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";
9th Apr 2021, 11:13 PM
ChaoticDawg
ChaoticDawg - avatar
10th Apr 2021, 12:06 AM
Calviղ
Calviղ - avatar