calling function on click html
snippet in html

javascript click event

user3649

<button onclick="myFunction()">Click me</button>

<p id="demo"></p>

<script>
function myFunction() {
  document.getElementById("demo").innerHTML = "Hello World";
}
</script>

javascript onclick

user5146

var myElem = document.getElementByID('ElemID');
myElem.onclick = function() {
	//do stuff
}

button onclick

user6754

<button onClick="script">

calling function on click html

user8288

  <img src="hospital.png" id="hospitals" onclick="damarkers();">