<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>购物车</title>
</head>
<body>
<div class="cart">
<div class="cart-title">我的购物车</div>
<table class="cart-table">
<tr>
<th><span class="cart-all">全选</span></th><th>商品</th>
<th>单价</th><th>数量</th><th>小计</th><th>操作</th>
</tr>
<tr class="cart-item">
<td><input class="cart-check" type="checkbox" checked></td>
<td><span class="cart-name">Loading……</span></td>
<td><span class="cart-price">0</span></td>
<td>
<span class="cart-reduce">-</span>
<span class="cart-num">0</span>
<span class="cart-add">+</span>
</td>
<td><span class="cart-subtotal">0</span></td>
<td><span class="cart-del">删除</span></td>
</tr>
<tr class="cart-bottom">
<td colspan="6">
<span>已选择<span class="cart-total-num">0</span>件商品</span>
<span>总计:<span class="cart-total-price">0</span></span>
<span>提交订单</span>
</td>
</tr>
</div>
<script src="ShopCart.js"></script>
<script>
ShopCart('cart',[
{name:'JaveScript实战',price:45.8,num:1},
{name:'PHP基础案例教程',price:49.8,num:2},
{name:'HTML+CSS网页制作',price:45.2,num:5},
{name:'Jave基础入门',price:45,num:8},
]);
</script>
</body>
</html>