Answers for "pass parameter to js function from html"

1

pass parameter to script tag

<script param="1">
	document.currentScript.getAttribute('param');
</script>
Posted by: Guest on September-14-2020
-2

javascript function with input value

<button class="btn btn-primary" onclick="transmit({search: document.getElementById('search_id').value});">
	<span class="glyphicon glyphicon-search"></span>
</button>
Posted by: Guest on October-30-2020

Code answers related to "pass parameter to js function from html"

Browse Popular Code Answers by Language