--------------------------------------------------------
<script>
var a = new Array();
</script>
<%
String str[] = {"aaa","bbb","ccc"};
int i=0,j=0;
for(i=0;i<str.length;i++) {
out.println("<script>");
out.println("a[" + i + "]='" + str + "'");
out.println("</script>");
}
%>
--------------------------------------------------------
输出一下试试:
<script>
for(j=0;j<a.length;j++)
alert(a[j]);
</script>