calling function on click html

HTML
<button onClick="script">
  <img src="hospital.png" id="hospitals" onclick="damarkers();">var myElem = document.getElementByID('ElemID');
myElem.onclick = function() {
	//do stuff
}<button onclick="myFunction()">Click me</button>

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

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

Also in HTML: