button onclick function w3schools code example
Example: javascript onclick
var myElem = document.getElementByID('ElemID');
myElem.onclick = function() {
//do stuff
}
var myElem = document.getElementByID('ElemID');
myElem.onclick = function() {
//do stuff
}