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

📄 v_005forder_jsp.java

📁 用J2EE开发的网站,可以应用到图书馆,图书超市
💻 JAVA
📖 第 1 页 / 共 2 页
字号:
      out.write("        <input type=\"text\" name=\"phone\" value=\"0\"/>\r\n");
      out.write("      </td>\r\n");
      out.write("    </tr>\r\n");
      out.write("    <tr>\r\n");
      out.write("      <td>收货人的E-mail:</td>\r\n");
      out.write("      <td>\r\n");
      out.write("        <input type=\"text\" name=\"email\" value=\"");
      out.print(user.getEmail());
      out.write("\"/>\r\n");
      out.write("      </td>\r\n");
      out.write("    </tr>\r\n");
      out.write("    <tr>\r\n");
      out.write("      <td>邮寄地址:</td>\r\n");
      out.write("      <td>\r\n");
      out.write("        <input type=\"text\" name=\"address\" value=\"");
      out.print(user.getAddress());
      out.write("\"/>\r\n");
      out.write("      </td>\r\n");
      out.write("    </tr>\r\n");
      out.write("    <tr>\r\n");
      out.write("      <td>邮政编码:</td>\r\n");
      out.write("      <td>\r\n");
      out.write("        <input type=\"text\" name=\"postcode\" value=\"");
      out.print(user.getPostcode());
      out.write("\"/>\r\n");
      out.write("      </td>\r\n");
      out.write("    </tr>\r\n");
      out.write("    <tr>\r\n");
      out.write("    <!--可以把送货方式和支付方式写入数据然后从数据提取-->\r\n");
      out.write("      <td>送货方式:</td>\r\n");
      out.write("      <td>\r\n");
      out.write("        <select name=\"send_state\">\r\n");
      out.write("           <option value=\"送货上门\">送货上门</option>\r\n");
      out.write("           <option value=\"特快专递\">特快专递</option>\r\n");
      out.write("           <option value=\"普通邮寄\">普通邮寄</option>\r\n");
      out.write("        </select>\r\n");
      out.write("      </td>\r\n");
      out.write("    </tr>\r\n");
      out.write("    <tr>\r\n");
      out.write("      <td>支付方式:</td>\r\n");
      out.write("      <td>\r\n");
      out.write("        <select name=\"payment\">\r\n");
      out.write("           <option value=\"银行转帐\">银行转帐</option>\r\n");
      out.write("           <option value=\"邮局汇款\">邮局汇款</option>\r\n");
      out.write("        </select>\r\n");
      out.write("      </td>\r\n");
      out.write("    </tr>\r\n");
      out.write("    <tr>\r\n");
      out.write("      <td>订单备注留言:</td>\r\n");
      out.write("      <td>\r\n");
      out.write("        <textarea cols=\"40\" rows=\"5\" name=\"note\"></textarea>\r\n");
      out.write("      </td>\r\n");
      out.write("    </tr>\r\n");
      out.write("  </table>\r\n");

try{user.getClose();}catch(Exception e){}
int k=1;

      out.write("\r\n");
      out.write("  <table width=\"360\" border=\"1\" cellspacing=\"0\" cellpadding=\"1\" align=\"center\">\r\n");
      out.write("    <caption>\r\n");
      out.write("      <b>您所定购的商品如下:</b>\r\n");
      out.write("    </caption>\r\n");
      out.write("    <tr bgcolor=\"#FFCC99\">\r\n");
      out.write("      <th>书名</th>\r\n");
      out.write("      <th>单价</th>\r\n");
      out.write("      <th>数量</th>\r\n");
      out.write("      <th>小计</th>\r\n");
      out.write("    </tr>\r\n");
      out.write("  ");

    Enumeration enum1 = cart.getEnumeration();
    //Set set;
    String[] tmpItem;
    int i=0;//记录商品种类数量
    float xiaoji=0;
    float zongji=0;
    while (enum1.hasMoreElements()) {
      tmpItem=(String[])enum1.nextElement();
  
      out.write("\r\n");
      out.write("    <tr>\r\n");
      out.write("      <td align=\"center\">");
      out.print(b.convert(tmpItem[1]));
      out.write("</td>\r\n");
      out.write("      <td align=\"center\">$");
      out.print(tmpItem[2]);
      out.write("</td>\r\n");
      out.write("      <td align=\"center\">");
      out.print(tmpItem[3]);
      out.write("</td>\r\n");
      out.write("      ");

      xiaoji=(Float.parseFloat(tmpItem[2]))*(Integer.parseInt(tmpItem[3]));
      
      out.write("\r\n");
      out.write("      <td align=\"center\">");
      out.print(xiaoji);
      out.write("</td>\r\n");
      out.write("      <input type=\"hidden\" name=\"id");
      out.print(i);
      out.write("\" value=\"");
      out.print(tmpItem[0]);
      out.write("\"/>\r\n");
      out.write("      <input type=\"hidden\" name=\"title");
      out.print(i);
      out.write("\" value=\"");
      out.print(b.convert(tmpItem[1]));
      out.write("\"/>\r\n");
      out.write("      <input type=\"hidden\" name=\"price");
      out.print(i);
      out.write("\" value=\"");
      out.print(tmpItem[2]);
      out.write("\"/>\r\n");
      out.write("      <input type=\"hidden\" name=\"quantity");
      out.print(i);
      out.write("\" value=\"");
      out.print(tmpItem[3]);
      out.write("\"/>\r\n");
      out.write("    </tr>\r\n");

zongji+=xiaoji;
i+=1;}

      out.write("\r\n");
      out.write("<tr><td colspan=\"4\">总价格:");
      out.print(zongji);
      out.write("</td></tr>\r\n");
      out.write("</table>\r\n");
      out.write("<center>\r\n");
      out.write("<br>\r\n");
      out.write("<input type=\"hidden\" name=\"item\" value=\"");
      out.print(i);
      out.write("\"/>\r\n");
      out.write("<input type=\"hidden\" name=\"date\" value=\"\"/>\r\n");
      out.write("<input type=\"hidden\" name=\"year\" value=\"\"/>\r\n");
      out.write("<input type=\"hidden\" name=\"month\" value=\"\"/>\r\n");
      out.write("<input type=\"submit\" value=\"确认提交\" onclick=\"orderid()\"/>\r\n");
      out.write("<input type=\"reset\" value=\"重新填写\"/>\r\n");
      out.write("<!--怎样单击按钮耳关闭此页面,不使用事件-->\r\n");
      out.write("<input type=\"button\" name=\"cancel\" value=\"取消订单\" onclick=\"window.close()\"/>\r\n");
      out.write("</center>\r\n");
      out.write("</form>\r\n");
      out.write("</body>\r\n");
      out.write("\r\n");
      out.write("<html>\r\n");
      out.write("<head>\r\n");
      out.write("<meta http-equiv=\"Content-Type\" content=\"text/html; charset=gb2312\">\r\n");
      out.write("<title>foot</title>\r\n");
      out.write("<link href=\"index.images/style.css\" type=text/css rel=stylesheet>\r\n");
      out.write("</head>\r\n");
      out.write("\r\n");
      out.write("<body>\r\n");
      out.write("<DIV align=center>\r\n");
      out.write("<TABLE cellSpacing=0 cellPadding=1 width=780 align=center bgColor=#000000\r\n");
      out.write("border=0>\r\n");
      out.write("  <TBODY>\r\n");
      out.write("  <TR bgColor=#ffffff>\r\n");
      out.write("    <TD align=center background=index.images/title_left.gif><FONT\r\n");
      out.write("      color=#ff3000><B>..::友情站点::..</B></FONT> </TD></TR>\r\n");
      out.write("  <TR bgColor=#ffffff>\r\n");
      out.write("        <TD align=center> <A href=\"null.htm\" target=_blank><IMG\r\n");
      out.write("      height=53\r\n");
      out.write("      alt=\"名称:上海书城&#13;&#10;地址:http://www.bookmall.com.cn/&#13;&#10;简介:购书中心\"\r\n");
      out.write("      hspace=1 src=\"index.images/logogif.gif\" width=148 vspace=1\r\n");
      out.write("      border=0></A> <A href=\"null.htm\" target=_blank><IMG height=53\r\n");
      out.write("      alt=\"名称:雅虎&#13;&#10;地址:http://cn.yahoo.com&#13;&#10;简介:搜索引擎\" hspace=1\r\n");
      out.write("      src=\"index.images/cn_sm4.gif\" width=144 vspace=1 border=0></A> <A\r\n");
      out.write("      href=\"null.htm\" target=_blank><IMG height=53\r\n");
      out.write("      alt=\"名称:丽水市新华书店&#13;&#10;地址:http://www.lsxhsd.com&#13;&#10;简介:网上书店\"\r\n");
      out.write("      hspace=1 src=\"index.images/logo_ls.jpg\" width=164 vspace=1\r\n");
      out.write("      border=0></A> <A href=\"null.htm\" target=_blank><IMG\r\n");
      out.write("      height=53 alt=\"名称:博库书城&#13;&#10;地址:http://www.bookuu.com&#13;&#10;简介:网上书店\"\r\n");
      out.write("      hspace=1 src=\"index.images/logo_002.gif\" width=162 vspace=1\r\n");
      out.write("      border=0></A> </TD>\r\n");
      out.write("      </TR>\r\n");
      out.write("  <TR bgColor=#ffffff>\r\n");
      out.write("        <TD align=center>| <A\r\n");
      out.write("      title=\"名称:中国图书商报&#13;&#10;地址:http://www.cbbr.com.cn/&#13;&#10;简介:全国性书业报刊\"\r\n");
      out.write("      href=\"http://www.cbbr.com.cn/\" target=_blank>中国图书商报</A> | <A\r\n");
      out.write("      title=\"名称:四川新华书店&#13;&#10;地址:http://www.xinhuabookstore.com/&#13;&#10;简介:网上购书\"\r\n");
      out.write("      href=\"http://www.xinhuabookstore.com/\" target=_blank>四川新华书店</A> | <A\r\n");
      out.write("      title=\"名称:博览群书&#13;&#10;地址:http://www.gmw.com.cn/gmw/blqs&#13;&#10;简介:|文化思考 |学术之窗 |书与人 |新书点评 |读者茶座 \"\r\n");
      out.write("      href=\"http://www.gmw.com.cn/gmw/blqs\" target=_blank>博览群书</A> | <A\r\n");
      out.write("      title=\"名称:中华读书报&#13;&#10;地址:http://www.gmdaily.com.cn/gmw/ds&#13;&#10;简介:|家园 |要闻 |每周了望 |电脑书城 |国际文化 |电脑时代 |读者看法 |评论 |专版 |教育双周刊 |学术双周刊 \"\r\n");
      out.write("      href=\"http://www.gmdaily.com.cn/gmw/ds\" target=_blank>中华读书报</A> | <A\r\n");
      out.write("      title=\"名称:浙江图书馆&#13;&#10;地址:http://www.zjlib.net.cn/default.asp&#13;&#10;简介:付费网上阅读\"\r\n");
      out.write("      href=\"http://www.zjlib.net.cn/default.asp\" target=_blank>浙江图书馆</A> | <A\r\n");
      out.write("      title=\"名称:超星数字图书馆&#13;&#10;地址:http://www.ssreader.com/&#13;&#10;简介:付费网上阅读\"\r\n");
      out.write("      href=\"http://www.ssreader.com/\" target=_blank>超星数字图书馆</A> | <A\r\n");
      out.write("      title=\"名称:郑州教育网&#13;&#10;地址:http://www.zzedu.org&#13;&#10;简介:介绍郑州教育信息\"\r\n");
      out.write("      href=\"http://www.zjscedu.org/\" target=_blank>郑州教育网</A> | <A\r\n");
      out.write("      title=\"名称:中国设计教学网&#13;&#10;地址:http://www.5a609.com/&#13;&#10;简介:设计教学\"\r\n");
      out.write("      href=\"http://www.5a609.com/\" target=_blank>中国设计教学网</A> | </TD>\r\n");
      out.write("      </TR></TBODY></TABLE>\r\n");
      out.write("<HR width=780 color=#077bbf SIZE=1>\r\n");
      out.write("\r\n");
      out.write("<TABLE cellSpacing=2 cellPadding=0 width=780 align=center border=0>\r\n");
      out.write("  <TBODY>\r\n");
      out.write("  <TR>\r\n");
      out.write("        <TD\r\n");
      out.write("      align=center>KSNB网上书店&nbsp;0371-65015922&nbsp;QQ:115465086<BR>\r\n");
      out.write("          技术支持QQ:35083766 电子信箱:<A href=\"mailto:txlng@163.com\"><FONT\r\n");
      out.write("      face=\"Arial, Helvetica, sans-serif\"\r\n");
      out.write("      color=#3333ff>txlng@163.com</FONT></A> <BR>\r\n");
      out.write("      <a href=\"http://www.ksnb.com/\">KSNB网上书店</a> 版权所有&copy;2005-2008<br>\r\n");
      out.write("      <img alt=\"\" src=\"index.images/biaoshi.gif\" />\r\n");
      out.write("      <SCRIPT language=JavaScript type=\"\">\r\n");
      out.write("document.write(\"<a href='null.htm'>\");\r\n");
      out.write("document.write(\"<img src='count/count.asp?Referer=www.scxhsd.net&Width=\"+escape(screen.width)+\"&Height=\"+escape(screen.height)+\"' border=0 width=0 height=0>\");\r\n");
      out.write("document.write(\"</a>\");\r\n");
      out.write("</SCRIPT>\r\n");
      out.write("</TD></TR></TBODY></TABLE></DIV>\r\n");
      out.write("</body>\r\n");
      out.write("</html>\r\n");
      out.write("\r\n");
      out.write("</html>\r\n");
      out.write("</font>\r\n");
    } catch (Throwable t) {
      if (!(t instanceof SkipPageException)){
        out = _jspx_out;
        if (out != null && out.getBufferSize() != 0)
          out.clearBuffer();
        if (_jspx_page_context != null) _jspx_page_context.handlePageException(t);
      }
    } finally {
      if (_jspxFactory != null) _jspxFactory.releasePageContext(_jspx_page_context);
    }
  }
}

⌨️ 快捷键说明

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