hello i have created buttons dynamically using js.now i need these buttons to be presented inside a table format with in the html table tag help pls
function funchr()
{
$( ".hr" ).remove();
var btn = document.createElement("BUTTON");
var t = document.createTextNode("VIEW PROFILE");
btn.appendChild(t);
btn.setAttribute("id","viewid");
btn.setAttribute("class","vp");
document.body.appendChild(btn);
var btn = document.createElement("BUTTON");
var t = document.createTextNode("EMPLOYEE DIRECTORY");
btn.appendChild(t);
btn.setAttribute("id","empdir");
btn.setAttribute("class","ed");
document.body.appendChild(btn);
var btn = document.createElement("BUTTON");
var t = document.createTextNode("CREATE ABSENCE");
btn.appendChild(t);
btn.setAttribute("id","crabs");
btn.setAttribute("class","ca");
document.body.appendChild(btn);
}
<div class="hr">
<input type="button" id="hr" class="hrButton" value="HR" onclick="funchr();" />
<table id="hrtable"> </table>