JSFiddle - React, Tailwind, and code Playground

by techiedelight

HTML

<!doctype html>
<html lang="en">
<body>
  <a href='https://www.bing.com/'>Click Me</a>
  <div>
    <button id="submit">Change Hyperlink</button>
  </div>
</body>
</html>

CSS

button {
    font-size: 14px;
    margin: 8px;
    padding: 3px;
}

JavaScript

$(document).ready(function() {
    $("#submit").click(function() {
        $("a").prop("href", "https://www.google.com/");
        console.log("Hyperlink Changed");
    })
});