HTML DOM Input Number stepUp() Method

The DOM input number stepUp() method increments the value of input number field by a specified value.

Syntax

Following is the syntax ?

object.stepUp(number)

Here, if number parameter is omitted then it increments the value by 1.

Example

Let us see an example of HTML DOM input number stepUp() method ?



HTML DOM stepUp()/stepDown() Demo



stepUp()/stepDown() Method Demo

Hi! How old are you?


Output

This will produce the following output ?

Now Click on "StepUp Value" or "StepDown Value" button to increment or decrement the value of input number field.


Updated on: 2026-03-11T22:50:44+05:30

166 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements