Answers for "onclick 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
3

how to call a function in react with arguments onclick

<button onClick={() => sayHello('James')}>Greet</button>
Posted by: Guest on September-05-2020

Code answers related to "onclick parameters"

Browse Popular Code Answers by Language