Answers for "call a function on button click js"

1

how to call a function with a button in javascript

<script>
		function myFunction()
		{
			document.write("<h1>HELLO</h1>")
		}
	</script>
<button onclick="myFunction()">Click</button>
Posted by: Guest on November-12-2020
0

calling function on click html

<img src="hospital.png" id="hospitals" onclick="damarkers();">
Posted by: Guest on June-27-2020

Code answers related to "call a function on button click js"

Code answers related to "Javascript"

Browse Popular Code Answers by Language