pass arguments to onclick function javascript code example
Example: 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" -->