您好,登錄后才能下訂單哦!
<script type="text/JavaScript"> function qtyUpdate(kind){ var f = document.form1; var c = f.qty.value; if(kind == "up"){ c++; }else if(kind == "down"){ if(c > 1) c--; } f.qty.value = c; } </script>
<FORM name=form1 > <TABLE border=0 cellSpacing=0 cellPadding=0> <TBODY> <TR> <TD rowSpan=2><INPUT value=2 readOnly size=5 name=qty></TD> <TD rowSpan=2 width=3></TD> <TD><A href="javascript:qtyUpdate('up')"><IMG src="btn_up.gif" width=11 height=8></A></TD> </TR> <TR> <TD align=right><A href="javascript:qtyUpdate('down')"><IMG src="btn_down.gif" width=11 height=8></A></TD> </TR> </TBODY> </TABLE> </FORM>
或
<script type="text/javascript" src="/wang_7380031@126/blog/js/jquery-1.4.2.min.js"></script>
<script type="text/JavaScript">
function qtyUpdate(kind,id){
var num = parseInt($('#amount_'+id).val());
if(kind == "up"){
$('#amount_'+id).val(num+1);
}else{
if(num>1){
$('#amount_'+id).val(num-1);
}
}
}
</script>
<A href="javascript:qtyUpdate('down','<?php echo $key; ?>')" ><IMG src="/wang_7380031@126/blog/p_w_picpaths/down1.jpg"></A>
<input id='amount_<?php echo $key;?>' value="1" type="text" name='qty[]' size="3">
<A href="javascript:qtyUpdate('up','<?php echo $key; ?>')" ><IMG src="/wang_7380031@126/blog/p_w_picpaths/up1.jpg"></A>
免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點不代表本網(wǎng)站立場,如果涉及侵權(quán)請聯(lián)系站長郵箱:is@yisu.com進行舉報,并提供相關(guān)證據(jù),一經(jīng)查實,將立刻刪除涉嫌侵權(quán)內(nèi)容。