如何在jsp表达式标记中使用多个for循环变量
<script>
for(var a=0;a<dir.length;a++){
document.getElementById(a).innerHTML = dir[a];
}
for(var r=0;r<dir.length;r++){
document.getElementById(r).innerHTML = dir[r];
}
</script>
在这里,我想使用
<%for(int i=0;i<imei_no.length;i++){%>
<span id = "<%=a>"/>//how can assign variable a for dynamic
<span id = "<%=r>"/>//how can assign variable r for dynamic
<%}%>
答案 0 :(得分:0)
<% for(int i=0;i<imei_no.length();i++){
out.print("<span id = \"" + a + "\"/>");
out.print("<span id = \"" + r + "\"/>");
}%>