Answers for "javascript pass argument to onclick event"

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 "javascript pass argument to onclick event"

Browse Popular Code Answers by Language