How to make an addition instead of a concatenation

后端 未结 4 1300
遥遥无期
遥遥无期 2020-12-21 00:53

I have an input button. I created for this input an attribute called \"multiplicateur\" which has the value of 1. When the button is clicked I have a .click() t

4条回答
  •  梦毁少年i
    2020-12-21 01:40

    For substracting

    function removeFromQtt(){
                 $("qty").value = parseInt($("qty").value)-1;
     }
    

    For addition

    function add(){
                 $("qty").value = parseInt($("qty").value)+1;
     }
    

提交回复
热议问题