JSFiddle - React, Tailwind, and code Playground

HTML

<div id="home"></div>

JavaScript

function refreshdiv(str) {
if(str=='a'){
   alert('a');
}
if(str=='b'){
   alert('b');
}
if(str=='c'){
   alert('c');
}}

document.getElementById('home').innerHTML = '<button type="button" style="height: 180px; width: 200px"  onclick="refreshdiv(\'a\')"> a </button><button type="button" style="height: 180px; width: 200px" onclick="refreshdiv(\'b\')"> b </button><button type="button" style="height: 170px; width: 200px" onclick="refreshdiv(\'c\')"> c </button>';