JSFiddle - React, Tailwind, and code Playground

by techiedelight

HTML

<img id="container" src='https://avatars0.githubusercontent.com/u/70142'/>
<button>Refesh</button>

CSS

#container {
  width: 200px;
  height: 200px;
  border: 1px solid;
}

JavaScript

document.querySelector("button").onclick = function() {
  var url = "https://upload.wikimedia.org/wikipedia/commons/5/53/Google_%22G%22_Logo.svg";
  document.getElementById("container").src = url;
}