Today I am going tell  how to dynamically change document’s / window’s title using JavaScript and jQuery.

The best way to change the document title is to use native javascript api document.title.

document.title = "New Window Title by Javascript";

The equivalent jQuery code of js code above.

$(document).prop('title', 'New Window Title by jQuery');
$("title").text('New Window Title by jQuery');

Related Posts