como vincular o js função ao botão
<input id="clickMe" type="button" value="clickme" onclick="doFunction();" />
Charming Constrictor
<input id="clickMe" type="button" value="clickme" onclick="doFunction();" />
//- Using a function pointer:
document.getElementById("clickMe").onclick = doFunction;
//- Using an anonymous function:
document.getElementById("clickMe").onclick = function () { alert('hello!'); };