pass parameter from script js to java code example
Example 1: pass parameter to script tag
<script param="1">
document.currentScript.getAttribute('param');
</script>
Example 2: How to Pass Parameter in JavaScript Function From Html
<!DOCTYPE html>
<html>
<head>
<title>function parameters javascript</title>
</head>
<body>
<button onclick="myfunctionName('rohan')">Click</button>
<script type="text/javascript">
function myfunctionName(a){
alert(a);
}
</script>
</body>
</html>