#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2006
    Posts
    21
    Rep Power
    0

    Number Increase/Decrease with step


    I want to have two buttons next to a number input. Simply to increase or decrease it.

    Easy as until I introduce a 'step' I want 0.01 and increase to 0.02 etc.

    Any ideas?

    Code:
     <input type=number step=0.01 />
    <button id="inc">+</button>
    <button id="dec">-</button>
  2. #2
  3. Impoverished Moderator
    Devshed Supreme Being (6500+ posts)

    Join Date
    Mar 2007
    Location
    Washington, USA
    Posts
    16,796
    Rep Power
    9646
    You know that browsers include their own increase and decrease buttons, right?

    Use .value. This... is really all that should need to be said.

    Having problems? What is your code and how is it not working?

IMN logo majestic logo threadwatch logo seochat tools logo