calling a function on click of button in javascript code example
Example 1: javascript onclick
var myElem = document.getElementByID('ElemID');
myElem.onclick = function() {
//do stuff
}
Example 2: calling function on click html
<img src="hospital.png" id="hospitals" onclick="damarkers();">