Answers for "onclick html with parameters"

3

javascript onclick parameters

<button onclick="myfunctionName('John')">Click</button>

<script type="text/javascript">
	function myfunctionName(String){
		alert(String);
	}
</script>
<!-- Will Show an Alert Box Saying "John" -->
Posted by: Guest on May-02-2021

Code answers related to "onclick html with parameters"

Browse Popular Code Answers by Language