<html>
<body>
<h1>HTMLCollection item() Method</h1>
<p>A P element.</p>
<p>Another P element.</p>
<p>A third P element.</p>
<p>Click the button to change the HTML content of the first P element:</p>
<button onclick="myFunction()">Change Content</button>
<script>
function myFunction() {
document.getElementsByTagName("P")[0].innerHTML = "Paragraph changed";
}
</script>
</body>
<!-- Mirrored from www.w3schools.com/jsref/tryit.asp?filename=tryjsref_htmlcollection_item_p2 by HTTrack Website Copier/3.x [XR&CO'2014], Mon, 27 Jan 2020 03:03:05 GMT -->
</html>