<!DOCTYPE html>
<html lang="en-US">
<body>
<p><a href="/jquery">Learn jQuery</a></p>
<p>Click on the button to change the text in anchor tag.</p>
<button onclick="myFunction()">Click Me</button>
<script>
var elem = document.getElementsByTagName("a")[0];
function myFunction(){
elem.innerText = "Master jQuery";
}
</script> </body>
</html>