Answers for "how to call a function in button click in javascript"

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 "how to call a function in button click in javascript"

Code answers related to "Javascript"

Browse Popular Code Answers by Language