Google News
logo
JavaScript - Interview Questions
What is the method to change the title of a page using JavaScript?
Generally, the page title varies based on the HTML document and the element structure. We can give id to an element and use code:
 
document.getElementById(‘page-title-id’).innerHTML=NewTitle;
Advertisement