Java Tutorial/JSP/JavaScript JSP
Pass Parameter from JavaScript to JSP
index.html
<HTML>
<HEAD>
</HEAD>
<BODY>
<DIV STYLE="POSITION:ABSOLUTE; LEFT:10; TOP:10; WIDTH:480; HEIGHT:400;
BACKGROUND-COLOR:BLACK;"></DIV>
</BODY>
<SCRIPT>
<!--
var outString = "basic.jsp?x1=" + 10
outString += "&y1=" + 10
outString += "&x2=" + 100
outString += "&y2=" + 100
location.href = outString
// -->
</SCRIPT>
</HTML>