Answers for "how to pass java variable to javascript function in jsp"

0

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>
Posted by: Guest on March-29-2021

Code answers related to "how to pass java variable to javascript function in jsp"

Code answers related to "Javascript"

Browse Popular Code Answers by Language