JSFiddle - React, Tailwind, and code Playground
HTML
<button type="button" id="submit">
Click me!
</button>
<H1 id="content">Hello</H1>
JavaScript
var buttonClick = document.getElementById('submit');
var h1Content = document.getElementById('content').innerHTML;
buttonClick.onclick = function() {
if (h1Content != "") {
h1Content = "";
}
}