⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 listitems.tag

📁 用Struts+Hibernate实现一个在线书店系统
💻 TAG
字号:
<%@ tag pageEncoding="utf-8" %>
<%@ tag body-content="empty" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ attribute name="items" required="true" type="java.util.Set" %>

<table cellspacing=0 cellpadding=0 width="100%" bgcolor="#C2E980">
<tr>
	<td></td>
	<td><b>单价</b></td>
	<td><b>数量</b></td>
	<td><b>共计</b></td>
</tr>

<c:forEach items="${items}" var="thisItem" varStatus="status">
	<c:set value="${total + thisItem.value}" var="total"/>
	<c:set value="${thisItem.book}" var="book"/>
<tr>
		<td><b>${status.count}. ${book.name}</b></td>		
		<td><fmt:formatNumber value="${thisItem.unitPrice}" type="currency"/></td>			
		<td>${thisItem.qty}</td>	
		<td><fmt:formatNumber value="${thisItem.value}" type="currency"/></td>
</tr>
</c:forEach>
<tr>
	<td colspan="4">&nbsp;</td>
</tr>
<tr>
	<td colspan="3"><b>商品总金额</b></td>
	<td><b><fmt:formatNumber value="${total}" type="currency"/></b></td>			
</tr>
</table>	

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -