zoukankan      html  css  js  c++  java
  • 简单的购物车应用案例 相关代码1

    <%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
    <%
    String path = request.getContextPath();
    String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
    %>
    <html>
      <head>
       
       
        <title>购物肉类商品页面</title>

      </head>
     
      <body>
        <%
        request.setCharacterEncoding("utf-8");
        if(request.getParameter("c1")!=null)
        session.setAttribute("s1", request.getParameter("c1"));
         if(request.getParameter("c2")!=null)
        session.setAttribute("s2", request.getParameter("c2")) ;
        if(request.getParameter("c3")!=null)
        session.setAttribute("s3", request.getParameter("c3"));
       
         %>
         各类肉大甩卖,一律十块:<br>
         <form method="post" action="a.jsp">
         <p>
         <input type="checkbox" name="c1" value="猪肉">猪肉&nbsp;
         <input type="checkbox" name="c2" value="牛肉">牛肉&nbsp;
         <input type="checkbox" name="c3" value="羊肉">羊肉
          </p>
         <p>
         <input type="submit" value="提交" name="B1">
         <a href="b.jsp">买点别的</a>&nbsp;
        
         <a href="c.jsp">查看购物车</a>
         </p>
        
         </form>
      </body>
    </html>

  • 相关阅读:
    HDU-5818-Joint Stacks
    蓝桥杯-2016CC-卡片换位
    HDU-2255-奔小康赚大钱(KM算法)
    蓝桥杯-PREV31-小朋友排队
    crypto.js加密传输
    js之对象
    LigerUi之ligerMenu 右键菜单
    关于js中window.location.href,location.href,parent.location.href,top.location.href的用法
    设置js的ctx
    AngularJS简单例子
  • 原文地址:https://www.cnblogs.com/www-hsy-com/p/7658481.html
Copyright © 2011-2022 走看看