JSFiddle - React, Tailwind, and code Playground
by Tintu Raju
HTML
<input type='button' id='clear_div' value='click me'>
<div id='txx'>Some text</div>
JavaScript
document.getElementById("clear_div").addEventListener("click",function(){
var clear="";
document.getElementById('txx').innerHTML = clear;
});