分析:
1.点击“+”或者“-”时当前兄弟文本框中的数值变化
2.文本框最小值为1,所以点击“-”时需要进行判断
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<script src="jquery-1.6.2.min.js"></script>
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon" />
<style>
body {
margin: 0px;
padding: 0px;
}
.p-num1,
.p-num2 {
width: 170px;
margin: 20px;
}
a {
color: #666;
text-decoration: none;
}
a:hover {