<html>
<head>
<title>HTML DOM Objects</title>
</head>
<body>
<p>Click the button to change the text of the document's title.</p>
<button onclick="myFunction()">Try it</button>
<p id="demo"></p>
<script>
function myFunction() {
document.getElementsByTagName("TITLE")[0].text = "A new title text..";
document.getElementById("demo").innerHTML = "The text of the document's title was changed from 'HTML DOM Objects' to 'A new title text..'.";
}
</script>
</body>
<!-- Mirrored from www.w3schools.com/jsref/tryit.asp?filename=tryjsref_title_text2 by HTTrack Website Copier/3.x [XR&CO'2014], Mon, 27 Jan 2020 03:17:51 GMT -->
</html>