<html>
<body>
<a name="html">HTML Tutorial</a><br>
<a name="css">CSS Tutorial</a><br>
<a name="xml">XML Tutorial</a><br>
<p>Click the button to display the HTML content of the first anchor in the document.</p>
<button onclick="myFunction()">Try it</button>
<p id="demo"></p>
<script>
function myFunction() {
var x = document.anchors[0].innerHTML;
document.getElementById("demo").innerHTML = x;
}
</script>
</body>
<!-- Mirrored from www.w3schools.com/jsref/tryit.asp?filename=tryjsref_doc_anchors2 by HTTrack Website Copier/3.x [XR&CO'2014], Mon, 27 Jan 2020 03:01:39 GMT -->
</html>