jsp MySQL购物车价格总和_用html做一个购物车,能实现简单的产品数量和价格的加减就行。最后能计算出提交物品价格的总和。...

展开全部

html中的购物车的增减不能直接传送到后台,可以通过32313133353236313431303231363533e4b893e5b19e31333431343036ajax,在js中发送ajax

纯前端的话可以参考下面的html>

cart

body,p,a,input{

margin: 0;

padding: 0;

font-size: 12px;

}

.container{

width: 100%;

}

.main{

width: 1000px;

height: 500px;

margin:100px auto;

}

.main .cart-container table{

width: 100%;

}

.main .cart-container table tr{

text-align: center;

}

.main .cart-container table tr:hover{

background: rgba(128, 128, 128, 0.2);

}

.main .cart-container table .table-header{

height: 30px;

background: #d9d9d9;

font-size: 1.2em;

}

.main .cart-container table .table-header td:first-child{

border-left: solid 4px red;

box-sizing: border-box;

}

.main .cart-container table tr td:nth-child(1),

.main .cart-container table tr td:nth-child(2){

text-align: left;

}

.main .cart-container table tr td:nth-child(2){

width: 52%;

}

.main .cart-container table tr td:nth-child(3){

width: 12%;

}

.main .cart-container table tr td:nth-child(4){

width: 12%;

}

.main .cart-container table tr td:nth-child(5){

width: 12%;

}

.main .cart-container table tr td:last-child{

width: 10%;

}

.cart-good{

height: 60px;

}

.cart-good img{

float: left;

margin: 10px;

width: 60px;

}

.cart-good td p{

margin: 10px 0px;

}

/*加、减按钮*/

.cart-good td input[type='button']{

width: 20px;

height: 20px;

background: #00f300;

outline: none;

b

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值