Sometimes, we want to dynamically change a web page’s title with JavaScript.
In this article, we’ll look at how to dynamically change a web page’s title with JavaScript.
How to dynamically change a web page’s title with JavaScript?
To dynamically change a web page’s title with JavaScript, we set the document.title
property.
For instance, we write
document.title = "test";
to set the document.title
property to 'test'
to make 'test'
the title of the page.
Conclusion
To dynamically change a web page’s title with JavaScript, we set the document.title
property.