connecting a button function to a script in javascript 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
}