-1
在右側的數量在下面的輸入和Order按鈕的腳本爲什麼我的數量微調腳本不工作?
<div class="clear" id="dvQty">
<p class="qty-label">Qty:</p>
<div class="qty-plus" id="divup">+</div>
<div class="qty-input">
<input name="vwquantity" value="1" class="qty-input" type="text">
</div>
<div class="qty-minus" id="divdown">-</div>
<div class="add2cart fl"><input value="Add to Cart" class="ys_primary" title="Add to Cart" type="submit"><input name="vwcatalog" value="bodylogic" type="hidden"><input name="vwitem" value="herbal-select-creme-gallon" type="hidden"></div>
</div>
JS
$("#txtQty").numeric();
$("#divup").click(function() {
var qty = $("#txtQty").val();
qty++;
$("#txtQty").val(qty);
});
$("#divdown").click(function() {
var qty = $("#txtQty").val();
if(qty > 1) {
$("#txtQty").val(qty - 1);
}
});
什麼我只是沒有看到?
Your input doesn '沒有id'txtQty'就可以了。 – H77