Input Number stepUp() Method

❮ Input Number Object

Example

Increment the value of a number field by 5:

document.getElementById("myNumber").stepUp(5);
Try it Yourself »

Description

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

Tip: To decrement the value, use the stepDown() method.


Browser Support

Method
stepUp() Yes Not supported Yes Yes Yes

Note: In Safari, you must enter a number in the number field before you can increment the value.


Syntax

numberObject.stepUp(number)

Parameter Values

Parameter Description
number Required. Specifies the amount the value of the number field should increase.

If omitted, the numbers are incremented by "1"

Technical Details

Return Value: No return value

More Examples

Example

Increment the value of a number field by 1 (default):

document.getElementById("myNumber").stepUp();
Try it Yourself »

❮ Input Number Object
Copyright 1999-2023 by Refsnes Data. All Rights Reserved.