jsp如何循环遍历html元素
2016-11-09 15:30
148 查看
jsp代码块如下:
for(int i=0;i<5;i++){
%>
<tr style="height: 20px;">
<td style=" text-align: center;"><input type="hidden" id="q_jpk_id<%=i %>" name="q_jpk_id<%=i %>" value=" " /><input type="text" style="width:135px;" id="q_cname<%=i %>" name="q_cname<%=i %>" value=" " /></td>
<td style=" text-align: center; "><input type="text" style="width:60px;" id="q_relation<%=i %>" name="q_relation<%=i %>" value=" "/></td>
<td style=" text-align: center;" colspan="3"><input type="text" style="width:320px;" id="q_workunit<%=i %>" name="q_workunit<%=i %>" value=" "/></td>
<td style=" text-align: center;" ><input type="text" style="width:100px;" id="q_telMobile<%=i %>" name="q_telMobile<%=i %>" value=" "/></td>
</tr>
<%
}
%>
for(int i=0;i<5;i++){
%>
<tr style="height: 20px;">
<td style=" text-align: center;"><input type="hidden" id="q_jpk_id<%=i %>" name="q_jpk_id<%=i %>" value=" " /><input type="text" style="width:135px;" id="q_cname<%=i %>" name="q_cname<%=i %>" value=" " /></td>
<td style=" text-align: center; "><input type="text" style="width:60px;" id="q_relation<%=i %>" name="q_relation<%=i %>" value=" "/></td>
<td style=" text-align: center;" colspan="3"><input type="text" style="width:320px;" id="q_workunit<%=i %>" name="q_workunit<%=i %>" value=" "/></td>
<td style=" text-align: center;" ><input type="text" style="width:100px;" id="q_telMobile<%=i %>" name="q_telMobile<%=i %>" value=" "/></td>
</tr>
<%
}
%>
相关文章推荐
- Sql Server 中如何循环遍历查询结果
- jsp循环遍历后台List结果的三种常用方法
- 如何循环遍历winForm中所有窗体的名称,所有活动的窗体
- Java中返回的对象无法再jsp页面中循环遍历到标签上
- JSP中使用<c:forEach>标签循环遍历元素
- jsp如何遍历目录
- [转]python 如何在一个for循环中遍历两个列表
- python 如何在一个for循环中遍历两个列表
- 解决如何通过循环来使用数据库的值设置jsp的select标签的option值
- JSP-JSTL 如何跳出循环
- jsp循环遍历后台List结果的三种常用方法
- Sql Server 中如何循环遍历查询结果
- jsp循环遍历后台List结果的三种常用方法
- 两个集合直接的操作 如何jsp页面迭代遍历,js如何写函数
- jquery进行数组遍历如何跳出当前的each循环
- C++:在遍历/循环中删除map元素, 如何避免iter 迭代器失效
- JSP中如何 循环显示 数据库中的数据到list.jsp页面 (转载)
- C++:在遍历/循环中删除map元素, 如何避免iter 迭代器失效
- JSP中如何 循环显示 数据库中的数据到list.jsp页面 (转载)
- ssm框架中,如何单个的把数据库中的多选框值,遍历在jsp页面。