<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
<title>Document</title>
<style type="text/css">
#div {
width: 600px;
height: 200px;
border: 1px solid #000000;
margin: 0 auto;
display: flex;
}
.div {
flex: 1;
box-sizing: border-box;
border: 2px solid #204D74;
}
</style>
</head>
<body>
<div id="div">
<div>
<a>100</a>
</div>
<div>
<a>500</a>
</div>
<div>
<a>1000</a>
</div>
<div>
<a>300</a>
</div>
<div>
<a>400</a>
</div>
</div>
<button>相加</button>
</body>
<script src="lib/jQuery库/jquery-1.11.1.js"></script>
<script>
</script>
</html>
我想点击按钮之后就把div里面的所有数字加起来,请问怎么写?
产品经理不是经理
相关分类