Change the document title in JavaScript
Description
The following code shows how to change the document title.
Example
<!DOCTYPE HTML>
<html>
<body>
<script>
<!--from www.ja v a2 s . c o m-->
document.title = "new title";
document.writeln("title: " + document.title);
</script>
</body>
</html>
The code above generates the following result.
Javascript Tutorial Operation
Append content to the end of the HTML docum...
Delete all cookies by setting the expire da...
Navigate to the new URL and make an entry i...
Query HTML document using CSS selector in J...
Set new hash for a page in JavaScript
Use document.writeln() to append tags in Ja...
Use parent selector in CSS to query element...
Append content to the end of the HTML docum...
Change the document title in JavaScript
Check if the document object has the queryS...Delete all cookies by setting the expire da...
Navigate to the new URL and make an entry i...
Query HTML document using CSS selector in J...
Set new hash for a page in JavaScript
Use document.writeln() to append tags in Ja...
Use parent selector in CSS to query element...