这是我的页面代码:
<form action="" name="saveform" method="post">
<table align="center" border="1">
<tr>
<td>产品ID</td>
<td>产品名称</td>
<td>购买数量</td>
<td>单价</td>
<td>总价</td>
<td>处理</td>
</tr>
<c:forEach var="list" items="${requestScope.list}">
<tr>
<td>${list.product.id}</td>
<td>${list.product.name}</td>
<td><input type="text" name="${list.product.id}" value="${list.count}" size=5></td>
<td>${list.product.normalPrice}</td>
<td>${list.product.normalPrice}</td>
<td>
<a href="method3.do?methods=deleteProCount&productId=${list.product.id}">删除</a>
</td>
</tr>
</c:forEach>
<tr>
<td colspan="6">
<a href="">下单</a>
<a href="">修改</a>
</td>
</tr>
</table>
</form>想按修改时,能把整个页面的“购买数量”都进行修改。请各位大侠指点指点!!
<form action="" name="saveform" method="post">
<table align="center" border="1">
<tr>
<td>产品ID</td>
<td>产品名称</td>
<td>购买数量</td>
<td>单价</td>
<td>总价</td>
<td>处理</td>
</tr>
<c:forEach var="list" items="${requestScope.list}">
<tr>
<td>${list.product.id}</td>
<td>${list.product.name}</td>
<td><input type="text" name="${list.product.id}" value="${list.count}" size=5></td>
<td>${list.product.normalPrice}</td>
<td>${list.product.normalPrice}</td>
<td>
<a href="method3.do?methods=deleteProCount&productId=${list.product.id}">删除</a>
</td>
</tr>
</c:forEach>
<tr>
<td colspan="6">
<a href="">下单</a>
<a href="">修改</a>
</td>
</tr>
</table>
</form>想按修改时,能把整个页面的“购买数量”都进行修改。请各位大侠指点指点!!
list 里面放着一个对象,此对象中还包含product对象和count属性,显示是没有问题的。