run javasctipt function on click 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
}