<input name= "number" type= "text" id= "number" value= "1" size= "4" onblur= "Changeprice ()" style= "border:1px solid # CCC "/>
modified to
<span class= "goods_cut" _src= "images/plus1.gif" alt= "Decrease" width= " " height= "
<input name= "number" type= "text" id= "number" value= "1" size= "4" onblur= "Changeprice ()" style= "border:1px solid # CCC "/>
<span class= "Goods_add" _src= "Images/plus2.gif" alt= "Add" width= " height="
Add JS script again
Copy Code
<script language= "javascript" type= "Text/javascript" >
function Goods_cut () {
var Num_val=document.getelementbyid (' number ');
var new_num=num_val.value;
var Num = parseint (new_num);
if (num>1) num=num-1;
Num_val.value=num;
}
function Goods_add () {
var Num_val=document.getelementbyid (' number ');
var new_num=num_val.value;
var Num = parseint (new_num);
num=num+1;
Num_val.value=num;
}
</script>
Copy Code
add CSS style again
Copy Code
/ * Increase decrease---------------------------Product Details page * /
. Goods_gds {
height:35px;
Display:block;
Overflow:hidden;
}
. Goods_font {
Display:block;
Float:left;
height:15px;
margin:8px 3px 0;
font-size:12px;
}
. goods_cut {
border:0 none;
Cursor:pointer;
Display:block;
Float:left;
font-size:0;
height:15px;
line-height:0;
margin:8px 3px 0;
width:15px;
padding-right:0px;
_padding-right:0px;
}
Input.goodsbuybox,input.number {
border:1px solid #DDDDDD;
Float:left;
font-size:10px;
height:18px;
line-height:18px;
margin:5px 5px 5px 5px;
padding:0;
Text-align:center;
}
. Goods_add {
border:0 none;
Cursor:pointer;
Display:block;
Float:left;
font-size:0;
height:15px;
line-height:0;
margin:8px 3px 0;
width:15px;
}
. goods_number_tit{
Display:block;
Background:none;
Text-align:left;
padding-left:5px;
}
ECSHOP Item Details page Purchase quantity Add plus minus button