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

📄 shoporder.jsp

📁 一个仿造淘宝的jsp网站。功能比较完善
💻 JSP
字号:
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ page import="com.jc.taobao.gjj.logic.*" %>
<%@ page import="com.jc.taobao.gjj.entity.*" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
  <base href="<%=basePath%>">
  <title>My JSP 'ShopOrder.jsp' starting page</title>
  <meta http-equiv="pragma" content="no-cache">
  <meta http-equiv="cache-control" content="no-cache">
  <meta http-equiv="expires" content="0">
  <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
  <meta http-equiv="description" content="This is my page">
  <!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
  <link href="CSS/shopcar.css" rel="stylesheet" type="text/css">
  <link href="CSS/sell.css" rel="stylesheet" type="text/css">
  <link href="CSS/MyCss.css" rel="stylesheet" type="text/css">
  <style type="text/css">
<!--
.style1 {font-size: 12px}
.style2 {font-size: 14px}
-->
   </style>
  <script language="JavaScript" type="text/JavaScript">
<!--
function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
//-->
  </script>
  </head>
  
  <body>
<div id="shopcarbuttomdiv">
  <div id="shopcartop">
    <div id="shoptoppic"><img src="image/Head/2.jpg" width="240" height="31"></div>
    <div id="shoptopfont"> 

	  <form action="" method="post" name="myfrm"  style="vertical-align:middle;">     
        <table border="0" cellspacing="0" style="top: 85px; ">
          
		  <tr>
            <td width="54" height="20" align="center" valign="middle"><a href="" class="font style1">我要买</a></td>
            <td width="57" align="center" valign="middle"><a href="" class="font style1">我要卖</a></td>
            <td width="62" align="center" valign="middle"><a href="" class="font style1">我的淘宝</a></td>
            <td width="49" align="center" valign="middle"><a href="" class="font style1">社区</a></td>
            <td width="73" align="center" valign="middle"><a href="" class="font style1">交易安全</a></td>
            <td width="77" align="center" valign="middle"><a href="" class="font style1">帮助中心</a></td>
           <td width="166" align="right" valign="middle">
			 
			  
			  
			<input type="text" name="sousuo" id="sousou" height="15" size="15" value="开始全新搜索" style="border:1px solid #cccccc;font-size: 12;" onFocus="javascript:document.myfrm.sousuo.value='';" onBlur="document.myfrm.sousuo.value='开始全新搜索'">
			  <input style="font-size:10px"  type="submit" value="搜索">
				  
			  
			
		    </td>
            
          </tr>
		  
        </table>
	  </form>
	</div>
    <div id="Layer5" style="position: relative; height:15px;top: 0px;width:600px;float:right;">
  <table border="0" cellpadding="0" cellspacing="0">
  <tr>
             <td width="19%" valign="middle" class="font style3 style1">您好,欢迎来淘宝网!</td>
              <td width="70" align="center" valign="middle"><a href="" class="style3 style1">[免费注册]</a></td>
              <td width="70" align="center" valign="middle"><a href="" class="style3 style1" >[登录]</a></td>
              <td width="70" align="center" valign="middle"><a href="" class="style3 style1" >阿里旺旺</a></td>
              <td width="70" align="center" valign="middle"><a href="" class="style3 style1" >支付宝</a></td>
              <td width="70" align="center" valign="middle"><a href="" class="style3 style1" >高级搜索</a></td>
              <td width="70" align="center" valign="middle"><a href="" class="style3 style1" >我的邮箱</a></td>
              <td width="70" align="center" valign="middle"><a href="" class="style3 style1" >手机淘宝</a></td>
              <td width=70 align="center" valign="middle"><a href="" class="style4 style1" >更多服务</a></td>
    </tr>
    </table>
  </div>
  </div>
  <div id="shopcarfront">
     
    <table width="801" height="218" border="0" cellpadding="0" cellspacing="0">
     <%
      String username=(String)session.getAttribute("loginusername");
    if(username!=null)
    {
    %>
      <tr>
        <td colspan="5"><div align="center">尊敬的<% 
							 if(username==null)
							 {
							 out.print("null");
							 }else
							 {
							   %>
								<%=username %>
								<% 
							 }
							%>
								您好:(你所购买的物品如下)</div></td>
      </tr>
      <tr>
        <td colspan="4"><div align="center"></div></td>
      <td>&nbsp;</td>
      </tr>
      <tr align="center">
        <td colspan="5">
		<div id="shoporder">
          <table width="599" height="95" border="0" cellpadding="0" cellspacing="0">
            <tr>
              <td width="159"><div align="center">商品名称</div></td>
              <td width="145"><div align="center">商品价格</div></td>
              <td width="176"><div align="center">购买数量</div></td>
            </tr>
            <tr>
              <td height="2" colspan="3"><hr style=" border:1px solid #cccccc;border-style:dashed; display:block;"/></td>
              </tr>
            <%
                     ShopCart cart=(ShopCart)session.getAttribute("cart");
                     if(cart!=null)
		         	 {
			         	 List list=cart.getShopItems();
				   		for(ListIterator iter=list.listIterator();iter.hasNext();)
				   		{
				   		CartShopCount csc=(CartShopCount)iter.next();
				   		ShopInfo shop=(ShopInfo)csc.getObj();
                     %>
            
            <tr>
              <td height="29"><div align="center"><%=shop.getShopname() %></div></td>
              <td><div align="center"><%=shop.getPrice() %></div></td>
              <td><div align="center"><%=csc.getShopcount() %></div></td>
            </tr>
            <%} }%>
            <tr>
              <td height="30" colspan="3"><div align="center">总计金额:<%=cart.getTotal() %>元</div></td>
              </tr>
          </table>
		</div></td>
      </tr>
      <tr>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td width="274">&nbsp;</td>
        <td width="266">&nbsp;</td>
      </tr>
      <tr>
        <td colspan="5"><div align="center"><span class="style2">请认真填写下列信息以确保货物及时送到</span></div></td>
      </tr>
      <tr>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td><div align="center"></div></td>
        <td>&nbsp;</td>
      </tr>
      <tr align="center">
        <td colspan="5"><div id="shoporderinformation">
		<form action="servlet/CheckoutServlet" method="post">
          <table width="601" border="0" cellspacing="0" cellpadding="0">
            <tr>
              <td width="144">&nbsp;</td>
              <td width="300"><div align="center" class="style2">收获人信息</div></td>
              <td width="96">&nbsp;</td>
            </tr>
            <tr>
              <td><div align="center"><span class="style2">收获人姓名</span>:</div></td>
              <td><input type="text" name="receivename" width="250"  style="border:1px solid #cccccc; width:300px; "></td>
              <td>&nbsp;</td>
            </tr>
            <tr>
              <td><div align="center" class="style2">收获人电话:</div></td>
              <td><input type="text" name="receivetel" width="250" style="border:1px solid #cccccc; width:300px; "></td>
              <td>&nbsp;</td>
            </tr>
            <tr>
              <td><div align="center" class="style2">收获人地址:</div></td>
              <td><textarea name="receiveaddress" rows="5" cols="34"  style="border:1px solid #cccccc; width:300px; " type="_moz">
			  
			  </textarea></td>
              <td>&nbsp;</td>
            </tr>
            <tr>
              <td>&nbsp;</td>
              <td><div align="center" class="style2">订货人:</div></td>
              <td><div align="center"></div></td>
            </tr>
            <tr>
              <td>&nbsp;</td>
              <td><div align="center">
              <input type="hidden" name="username" value="<%=username %>">
                  <input type="submit" name="Submit" value="提交表单" style="border:1px solid #cccccc; ">&nbsp;&nbsp;&nbsp;&nbsp;
                  <input type="reset" name="Submit" value="重置表单" style="border:1px solid #cccccc; ">
              </div></td>
              <td>&nbsp;</td>
            </tr>
          </table>
		  </form>
        </div>
        <div align="center"></div></td>
      </tr>
      <%}
    else
    {%>
    <div align="center" style="margin-top: 50px;">对不起,您还没有登录,您的商品将不能入库,为了您的方便</div>
    <div align="center" style="margin-top: 20px;">请登陆后再进行操作如果您还不是淘宝会员,请赶快注册登陆!</div>
    <div align="center" style="margin-top: 20px">5秒钟后会自动跳到登陆界面,如果不能正常跳转,请点击下面</div>
    <div align="center" style="margin-top: 20px"><a href="Logintaobao.jsp">登录</a>  注册</div>
   <%} %>
    </table>
  </div>
  <div id="sellbuttom">
 <UL>
		  <LI><A href="">关于淘宝</A> </LI>
		  <LI><A href="">合作伙伴</A> </LI>
		  <LI><A href="">帮助中心</A></LI>
		  <LI><A href="">诚征英才</A> </LI>
		  <LI><A href="">联系我们</A> </LI>
		  <LI><A href="">网站地图</A> </LI>
		  <LI><A href="">热门商品</A> </LI>
		  <LI><A href="">热门品牌</A> </LI>
		  <LI><A href="">版权说明 </A></LI>
		  <LI><A href="">淘客推广</A> </LI>
  </UL>
<DIV id="sellbuttomfont">全球阿里巴巴 - 阿里巴巴网络:<A href="">中国站</A> 
    <A href="">国际站</A>
    <A href="">日文站</A> | <A 
href="">淘宝站</A> | <A 
href="">支付宝</A> | <A 
href="">中国雅虎</A> | <A 
href="">雅虎口碑网</A> | <A 
href="">阿里软件</A> | <A 
href="">阿里妈妈</A> </DIV>
<DIV id="sellbuttomfont2">Copyright 2003-2008, 版权所有 TAOBAO.COM  </DIV>
  </div>
  </div>
  </body>
</html>

⌨️ 快捷键说明

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