2020诺禾-诺禾

参数绑定之列表的jsp页面

 
<form action="${pageContext.request.contextPath }/update.action" method="post">
商品列表:
<table width="100%" border=1>
<tr>
<td><input type="checkbox" value="" name="ids"/></td>
<td>商品名称</td>
<td>商品价格</td>
<td>生产日期</td>
<td>商品描述</td>
<td>操作</td>
</tr>
<c:forEach items="${itemList }" var="item" varStatus="s">
<tr>
<td><input type="checkbox" value="${item.id }" name="ids"/></td>
<td><input type="text" value="${item.name }" name="itemsList[${s.index }].name"/></td>
<td><input type="text" value="${item.price }" name="itemsList[${s.index }].price"/></td>
<td><fmt:formatDate value="${item.createtime}" pattern="yyyy-MM-dd HH:mm:ss"/></td>
<td>${item.detail }</td>

<td><a href="${pageContext.request.contextPath }/itemEdit.action?id=${item.id}">修改</a></td>

</tr>
</c:forEach>

</table>
<input type="submit" value="提交"/>
</form>

猜你喜欢

转载自www.cnblogs.com/lovenuohe/p/12928314.html