实现目的:
1.购物数量的动态加减
2.总价会随购买数量的增加减少而变化
3.点击“确定购买”弹出对话框显示购买数量
<html>
<head>
<meta charset="utf-8">
<title></title>
</head>
<body>
购买数量:<input type="button" value="-" id="down">
<span id="num">1</span>
<input type="button" value="+" id="up">
<input type="button" value="确定购买" id="ok"><br>
单价:<input type="text" value="5" id="price" disabled><br>