ECSHOP Item Details page Purchase quantity Add plus minus button

Source: Internet
Author: User

<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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.