cart.jsp

来自「精通NetBeans光盘源代码,很好很好的资料」· JSP 代码 · 共 67 行

JSP
67
字号
<%@ page import="shop.cart.*,java.util.*" %><%@ page contentType="text/html;charset=GBK"%><html>    <head>        <title>cart detail page</title>        <link href="<%=request.getContextPath()%>/images/dvd.css" rel="stylesheet" type="text/css">    </head>    <body>        <p>&nbsp;</p><table align=center border=0 cellpadding=3 cellspacing=0 width=561>        <tbody>        <tr>         <td width="500" valign=top> <table width=100% height="100%" border=0 align=center cellpadding=2 cellspacing=0>            <tbody>                <tr>                     <td width="523" bgcolor=#ffffff><b class=newjoyo_05><font color=#000000                        face="Arial, Helvetica, sans-serif">&nbsp;&nbsp;您的购物车</font></b>                     </td>                </tr>            </tbody>        </table>                <table width=100% height="100%" border=0             cellpadding=0 cellspacing=0 bordercolorlight=#000000 bordercolordark=#000000>            <tbody>                <tr align=middle>                     <td> <table border=1 bordercolordark=#ffffff bordercolorlight=#000000                         cellpadding=2 cellspacing=0 width=100%>                        <tbody>                            <tr align=middle bgcolor=#CCCCCC valign=bottom>                                 <td height=18 width=265><font color=#000000>商品名称</font></td>                                <td height=18 width=68><font color=#000000>价格</font></td>                                <td height=18 width=68><font color=#000000>数量</font></td>                                <td align=middle height=18 width=62><font                                 color=#000000>取消</font></td>                            </tr>				 	                            <% ShoppingCartRemote cart= (ShoppingCartRemote)session.getAttribute("cart");                                Vector vec = cart.getCart();                                Enumeration enum = vec.elements();                                double cartbalance = 0.0;                                while(enum.hasMoreElements()){                                    CartItem ci = (CartItem )enum.nextElement();                            %>                            <tr align=middle valign=bottom>                                 <td align=left height=25 width=265> <font color=#000000><%=ci.getTitle()%>  </font></td>                                <td align=middle height=25 width=68><font color=#000000><%=ci.getPrice()%></font></td>                                <td height=25 width=68><font color=#000000><%=ci.getQty()%> </font></td>                                <td height=25 width=62><font color=#000000><a href="<%=request.getContextPath()%>/CartServlet?a=remove&id=<%=ci.getId()%>"><img src="<%=request.getContextPath()%>/images/cancel.gif" alt=取消 width="45" height="21" border=0></a> </font></td>                            </tr>                            <%}%>                        </tbody>                    </table></td>                </tr>                <tr align=middle>                     <td height=40><br> <table border=0 cellpadding=0 cellspacing=0 width="85%">                        <tbody>                            <tr>                                 <td align=middle width="25%">总价:<%=cart.getBalance()%>元</td>                                                   </tr>					                         </tbody>                    </table>		                    </td>                </tr>            </tbody>        </table>            		    </body></html>

⌨️ 快捷键说明

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