Latest web development tutorials
 

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

Method
stepDown() Yes Not supported Yes Yes Yes

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