How to find the title of the page using javascript

Posted by Manideepgoud under JavaScript category on | Points: 40 | Views : 108
To find the title of the page we use document.title.
<p id="demo"></p>
document.getElementById('demo').innerHTML = "The title of the page is:" + document.title;

In the above code we have given title as DotNetFunda , document.title displays what we have written in the title of the page.

The title of the page is DotNetFunda.

Comments or Responses

Login to post response