pass java value to javascript in 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>