Input Number stepDown() Method

Input Number Object Reference Input Number Object

Example

Decrement the value of a number field by 5:

document.getElementById("myNumber").stepDown(5);
Try it yourself »

Definition and Usage

The stepDown() method decrements the value of the number field by a specified number.

Tip: To increment the value, use the stepUp() method.


Browser Support

Internet Explorer Firefox Opera Google Chrome Safari

The stepDown() method is supported in all major browsers, except Internet Explorer.

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


Syntax

numberObject.stepDown(number)

Parameter Values

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

If omitted, the numbers are decremented by "1"

Technical Details

Return Value: No return value

More Examples

Example

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

document.getElementById("myNumber").stepDown();
Try it yourself »

Input Number Object Reference Input Number Object