<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta name="Keywords" content="">
<meta name="description" content="">
<title>ГГ</title>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js"></script>
</head>
<body>
<div class="item border">
<img src="img/shop/zont1.png" width="200">
<p><b>Зонт1</b> | Цена: 1200 руб</p>
<div class="sum_but">
<span class="plus">+</span>
<input value="3" maxlength="2" name="" id="" type="text" class="mam">
<span class="minus">-</span>
</div>
<button class="border" onclick="cart.addToCart(this, '001', 'Зонт1', '1200', '')">Купить</button>
</div>
<div class="item border">
<img src="img/shop/zont2.png" width="200">
<p><b>Зонт2</b> | Цена: 1500 руб</p>
<div class="sum_but">
<span class="plus">+</span>
<input value="5" maxlength="2" name="" id="" type="text" class="mam">
<span class="minus">-</span>
</div>
<button class="border" onclick="cart.addToCart(this, '002', 'Зонт2', '1500', '')">Купить</button>
</div>
<script>
var inputs = document.getElementsByClassName('mam');
alert(inputs[0].value);
alert(inputs[1].value);
</script>
<script>
var inputs = $('.mam');
alert(inputs[0].value);
alert(inputs[1].value);
</script>
</body>
</html>