
<html>
<head>

</head>
<body>
 <%
int i[]={1,2};

%>
<script language="JavaScript">
var jsArr = new Array();
<%
for (int j=0; j < i.length; j++) {
%>
jsArr[<%= j %>] = <%=i[j] %>;
<%}%>
function show()
{
alert(jsArr.length);
}
</script>
<form>
 
<input type="button" name="save" value="Save" onClick="show()">
</form>
</body>
</html>