<html>
<body>
<h1>HTMLCollection item() Method</h1>
<p>This is the first p element in body.</p>
<p>This example uses a shorthand method for the item() method</p>
<p>Click the button to change the content of the first P element:</p>
<button onclick="myFunction()">Change Content</button>
<script>
function myFunction() {
var x = document.getElementsByTagName("P")[0];
x.innerHTML = "Changed!";
}
</script>
</body>
<!-- Mirrored from www.w3schools.com/jsref/tryit.asp?filename=tryjsref_htmlcollection_item2 by HTTrack Website Copier/3.x [XR&CO'2014], Mon, 27 Jan 2020 03:03:05 GMT -->
</html>