onclick of button call function code example Example: calling function on click html Click to copy<img src="hospital.png" id="hospitals" onclick="damarkers();">