Hello! someone could help me in this, I'm trying to make an application to do certain calculations but I'm having some difficulty when doing Onclick. so below is my function Initializes what I need is that when the user clicks the button they send to the eventClick function and in it can identify the button ID
function inicializa() {
document.write("<head>");
document.write("<title>Pagina Principal</title>");
document.write("<meta name='viewport' content='width=device-width, initial-scale=1.0'>");
document.write("<link type='text/css' href='css/bootstrap.min.css' rel='stylesheet'>");
document.write("<script type='text/javascript' src='js/bootstrap.min.js'></script>");
document.write("<script type='text/javascript' src='js/appControler.js'></script>");
document.write("</head>");
document.write("<body>");
document.write("<nav class='navbar navbar-fixed-top navbar-inverse'>");
document.write("<div class='navbar-header'>");
document.write("<div class='navbar-header'>");
document.write("<a onload='inicializa()' class='navbar-brand'>Calculadora</a>");
document.write("</div>");
document.write("</div>");
document.write("<center>");
document.write("<img src='imagens/calculadora.png' alt='Calculadora' class='img-thumbnail'>");
document.write(" <div class='btn-group' id='DivButton'>");
document.write(" <button onclick='eventoClick()' id='Delta' class='btn btn-primary'>Delta</button>");
document.write(" <button onclick='eventoClick()' id='Pitagoras' class='btn btn-primary'>Pitagoras</button>");
document.write(" <button onclick='eventoClick()' id='JurosSimples' class='btn btn-primary'>Juros Simples</button>");
document.write(" </div>");
document.write("</center>");
document.write("</body>");
}
Could you help me?