jsp遍历存在session中的hashmap

					<c:forEach items="${cart }" var="entry" >
						<tr height="60">
							<td align="center" width="20%">${entry.key.foodName }</td>   //注意有一个key
					 		<td align="center" width="20%">${entry.key.price }</td>
					 		<td align="center" width="20%">
					 			<input type="text" value="${entry.value }" size="3" lang="3" onblur="alterSorder(this)"/>
					 		</td>
					 		<td align="center" width="20%">${entry.key.price }</td>
					 		<td align="center" width="20%">
					 			<input type="button" value="删除" class="btn_next" lang="3" onclick="removeSorder(this)" />
					 		</td>
								
						</tr>
					</c:forEach>

猜你喜欢

转载自blog.csdn.net/zhangzuyuanbest/article/details/81053680