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

📄 order.jsp

📁 网上服装店 能让用户在该网站上对物品进行上传购买等操作。该设计为原版
💻 JSP
字号:
<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*"%>
<%@ page import="com.bwm.db.Condb"%>
<%@ page import="com.bwm.cart.buyList"%>
<%@ page import="java.util.Vector"%>

<table border="0" cellpadding="0" cellspacing="0" width="625" align="center" >
      <tr>
        <td><img name="usercenter_01" src="image/usercenter_01.gif" width="625" height="82" border="0" alt=""></td>
      </tr>
      <tr>
        <td width="625" background="image/usercenter_02.gif">
		<table width="600" height="488" border="0" align="center" cellpadding="0" cellspacing="0" background=""> 
 <tr>
		<td><img name="cplist_01_01" src="image/gupic1.gif" width="600" height="50" border="0" alt="">   </td>
			</tr>
  <form action="user/clear.jsp" method="post" name="form1">
  <tr>
    <td height="429" valign="top"> 
      <table width="600"  border="1" align="center" cellpadding="0" cellspacing="00" class="tableBorder"> 
     
	  <tr align="center" valign="middle"> 
        <td height="40" colspan="6" nowrap background="" class="bgcolor"><font color="#FF0000">
          <%if(session.getAttribute("username")==null){out.println("您还没有登录");}else{out.println(session.getAttribute("username"));}%></font>,您的购物情况如下所示:(注:如果想删除商品,请将数量置零后点击修改按钮。)		</td> 
      </tr> 
      
     <tr align="center" valign="middle" class="bgcolor">        
        <td width="100" height="21">序号</td>
        <td width="200" height="21">商品名称</td> 
        <td width="100" height="21">单价</td> 
        <td width="100" height="21">数量</td>
		<td width="100" height="21">总金额</td>
	</tr>
		
	<%
	Vector shop=(Vector)session.getAttribute("shop");
	int num=0;
	int pric=0;
	if(shop==null||shop.size()==0){
	%> 
	<script language="javascript">
		alert("购物车中没有物品");
		window.location.href=("index.jsp");
	</script> 
	<%
	}else{
		for(int i=0;i<shop.size();i++){
			buyList mylist=(buyList)shop.elementAt(i);
			num=num+mylist.number*mylist.price;
	%> 
      <tr align="center" valign="middle" class="bgcolor">        
        <td width="100" height="21"><%=i+1%></td>
        <td width="200" height="21"><%=mylist.warename%></td> 
        <td width="100" height="21">¥<%=mylist.price%></td> 
        <td width="100" height="21">
          <input name="num<%=i%>" size="7" type="text" class="txt_grey" value="<%=mylist.number%>"></td> 
        <td width="100" height="21">¥<%=(mylist.price*mylist.number)%></td> 
        <script language="javascript">
			<!--
			function check(){
				if(isNaN(form1.num<%=i%>.value)){
					alert("请不要输入非法字符");
					return false;
					history.back();
				}
				if(form1.num<%=i%>.value==""){
					alert("请输入修改的数量");
					return false;
					history.back();
				}	
			}
			-->
		</script>
	<%
		}
	}
	%> 
      <tr align="center" valign="middle" class="bgcolor">
		<td height="21" colspan="4" align="right">
			总合计金额:</td>
        <td height="21" align="center">¥<%=num%></td>
      </table></td> 
  </tr>
  <tr>
    <td height="59" align="center" valign="top" background=""><a href="index.jsp">
      </a><a href="index.jsp">
      <input name="Submit" type="submit" class="btn_grey" value="修改" onClick="return check()">
继续购物</a>|<a href="user/putin.jsp">清空购物车</a>|<a href="money.jsp">去收银台</a></td>
    </tr>
  </form>
</table>
		
		</td>
      </tr>
      <tr>
        <td><img name="usercenter_03" src="image/usercenter_03.gif" width="625" height="4" border="0" alt=""></td>
      </tr>
</table>

⌨️ 快捷键说明

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