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 Anchor Text</button>
  </div>
</body>
</html>

CSS

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

JavaScript

document.getElementById('submit').onclick = function(e) {
  var anchors = document.querySelectorAll('a');
  anchors.forEach(function(a) {
    a.text = "Bing it!";
  });
}