Can somebody explain where I'm making mistake, please..!
Create a link that says “Buy Tickets” and has a href attribute of “tickets.html”.
Create a button that says “Upgrade”.
When the user clicks “Upgrade”, the “Buy Tickets” link url should change from “tickets.html” to “fancy_tickets.html”.
<script>
document.getElementById("upgrade").onclick = function () {
document.getElementById("buylink").href = "fancy_tickets.html";
};
</script>
<html>
<body>
<a id="buylink" href="tickets.html">Buy Tickets</a><br>
<button id ="upgrade">Upgrade</button>
</body>
</html>