Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

how to call a function with a button in javascript

<script>
		function myFunction()
		{
			document.write("<h1>HELLO</h1>")
		}
	</script>
<button onclick="myFunction()">Click</button>
 
PREVIOUS NEXT
Tagged: #call #function #button #javascript
ADD COMMENT
Topic
Name
9+6 =