enter image description here

How to make these buttons work ??? Help please, but I have already tried everything I know

Closed due to the fact that off-topic participants Yuri , Mikhail Vaysman , cheops , HamSter , user194374 28 Feb '17 at 9:12 .

  • Most likely, this question does not correspond to the subject of Stack Overflow in Russian, according to the rules described in the certificate .
If the question can be reformulated according to the rules set out in the certificate , edit it .

  • 3
    We will be very happy to see exactly what you tried. - user207618
  • 2
    And nothing that the search engine displays the first link solution to this form? - Yuri
  • five
    This question should be closed, because it is from the category “Write the code for me” and “I am too lazy to look for a solution myself” - Yuri
  • It’s not at all lazy to write the code yourself, if only I knew how to use JQuery, but alas, I haven’t reached it yet, only recently I started teaching JS, well, of course, after asking here, I found the answer already in Google where it says that you need to use plugins or write the code yourself. - Metallistener

1 answer 1

Distribute the styles yourself

$(function() { $("#plus").on("click", function(){ $val = $("#amount").val(); $("#amount").val(parseInt($val) + 1); }); $("#minus").on("click", function(){ $val = $("#amount").val(); $("#amount").val(parseInt($val) - 1); }); }); 
 <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> <input type="button" value="-" id="minus"/><input type="text" value="1" id="amount"/><input type="button" value="+" id="plus"/> 

  • :)24 smiling error sends :) Stop earning a turnip on such issues! - user207618
  • 3
    @Other enough to envy someone else's success :)) - tCode
  • Success - is the curve of the implementation of the simplest thing to the question of the user Lena? - user207618
  • 2
    @Other to the point! - tCode
  • @tCode, comrade, you're wrong - Yuri