JS 实现 购物车客户端 计算
来源:互联网 发布:网页视频剪辑软件 编辑:程序博客网 时间:2024/04/29 05:20
<html>
<head>
<title>实现购物车客户端计算</title>
<meta charset="utf-8" />
<style>
table{width:800px; text-align:center;
border-collapse:collapse;
margin:0 auto;margin-top:30px;
}
td,th{border:1px solid black}
td[colspan="3"]{text-align:center;}
td{width:220px;}
tr{height:50px;}
</style>
<script src="js/02buy.js"></script>
</head>
<body>
<table id="data">
<thead>
<tr>
<th>商品名称</th>
<th>单价</th>
<th>数量</th>
<th>小计</th>
</tr>
</thead>
<tbody>
<tr>
<td>iPhone8</td>
<td>¥8888</td>
<td>
<button onclick="calc(this)">-</button>
<span>0</span>
<button onclick="calc(this)">+</button>
</td>
<td>¥0</td>
</tr>
<tr>
<td>iPhone7 plus</td>
<td>¥6666</td>
<td>
<button onclick="calc(this)">-</button>
<span>0</span>
<button onclick="calc(this)">+</button>
</td>
<td>¥0</td>
</tr>
<tr>
<td>Mac pro</td>
<td>¥10888</td>
<td>
<button onclick="calc(this)">-</button>
<span>0</span>
<button onclick="calc(this)">+</button>
</td>
<td>¥0</td>
</tr>
</tbody>
<tfoot>
<tr>
<td colspan="3">Total</td>
<td>¥0</td>
</tr>
</tfoot>
</table>
</body>
</html>
<!DOCTYPE HTML>
<html>
<head>
<title>实现购物车客户端计算</title>
<meta charset="utf-8" />
<style>
table{width:800px; text-align:center;
border-collapse:collapse;
margin:0 auto;margin-top:30px;
}
td,th{border:1px solid black}
td[colspan="3"]{text-align:center;}
td{width:220px;}
tr{height:50px;}
</style>
<script src="js/02buy.js"></script>
</head>
<body>
<table id="data">
<thead>
<tr>
<th>商品名称</th>
<th>单价</th>
<th>数量</th>
<th>小计</th>
</tr>
</thead>
<tbody>
<tr>
<td>iPhone8</td>
<td>¥8888</td>
<td>
<button onclick="calc(this)">-</button>
<span>0</span>
<button onclick="calc(this)">+</button>
</td>
<td>¥0</td>
</tr>
<tr>
<td>iPhone7 plus</td>
<td>¥6666</td>
<td>
<button onclick="calc(this)">-</button>
<span>0</span>
<button onclick="calc(this)">+</button>
</td>
<td>¥0</td>
</tr>
<tr>
<td>Mac pro</td>
<td>¥10888</td>
<td>
<button onclick="calc(this)">-</button>
<span>0</span>
<button onclick="calc(this)">+</button>
</td>
<td>¥0</td>
</tr>
</tbody>
<tfoot>
<tr>
<td colspan="3">Total</td>
<td>¥0</td>
</tr>
</tfoot>
</table>
</body>
</html>
WEB前端学习交流群21 598399936
- JS 实现 购物车客户端 计算
- 使用Selector API实现购物车客户端计算
- js实现购物车
- JS实现的购物车
- js实现购物车效果
- 原生JS实现购物车的添加删除,以及总价计算的功能
- JavaScript实现购物车计算价格功能
- js实现击购物物品抛物线到购物车
- js购物车价格计算
- JS+COOKIES实现健壮的购物车
- 原生JS实现购物车结算
- 原生js+cookie实现购物车功能
- Angular js 实现简单购物车
- Angular,js实现简单购物车功能
- angular JS简单实现购物车功能
- js计算表格的值(例如购物车中)
- js 下拉自动加载 购物车的计算
- Js写购物车全选全不选计算单价总价代码
- poi+freemarker导出word(2003)
- 远程连接mysql数据库
- java版本不匹配解决办法
- EventBus3.0报 Subscriber class ...... already registered to......
- android-skill-summary
- JS 实现 购物车客户端 计算
- linux zip 命令的一些用法
- BP算法
- 用Linux_C语言模拟CP命令,实现文件和文件夹的拷贝
- 蓝牙HCI【HCI Command Packet】【LOGICAL LINKS】【数据格式】
- Jenkins check-out strategy
- hdu3549--Flow Problem(最大流(EK算法||ISAP优化))
- 互联网巨头纷纷布局社交 移动社交未来空间巨大
- android studio设置主题、护眼色、字体、Logcat前景色背景色