how to pass a variable from js to jsp code example
Example: how to pass java variable to javascript function in jsp
<% String str="Hello World"; %>
<html>
<head>
<script language="javascript">
function access(){
var s="<%=str%>";
alert(s);
}
</script>
</head>
<body onload="access()">
</body>
</html>