-----------html---------------------
< div class= "input-content">
<
input
type
=
"text"
name
=
"qty"
id
=
"qty"
maxlength
=
"12"
value
=
"1"
title
=
"Qty"
class
=
"input-text qty"
>
<
input
type
=
"button"
onclick
=
"
var
qty_el
=
document
.
getElementById
('qty');
var
qty
=
qty_el
.
value
;
if
(
!
isNaN
(
qty
))
qty_el
.
value
++
;
return
false
;
"
class
=
"qty-increase"
>
<
input
type
=
"button"
onclick
=
"
var
qty_el
=
document
.
getElementById
('qty');
var
qty
=
qty_el
.
value
;
if
(
!
isNaN
(
qty
)
&
amp
;
&
amp
;
qty
>
0
)
qty_el
.
value
--
;
return
false
;
"
class
=
"qty-decrease"
>
</
div
>
下面两个input是用来控制数量加减的
----------css---------------
.product-view .input-content
{
}
.product-options-bottom .add-to-cart .qty
{
}
.add-to-cart input.qty-increase
{
}
.add-to-cart input.qty-decrease
{
}