Input Number stepUp() Method
Definition and Usage
stepUp()
The method increases the value of the numeric field by the specified number.
Tip:To decrease the value, please use stepDown() Method.
Instance
Example 1
Increase the value of the numeric field by 5:
document.getElementById("myNumber").stepUp(5);
Example 2
Increase the value of the numeric field by 1 (default):
document.getElementById("myNumber").stepUp();
Syntax
numberObject.stepUp()number)
Parameter Value
Parameter | Description |
---|---|
number |
Required. Specifies the value to be incremented by the numeric field. If omitted, the number is incremented by "1". |
Technical Details
Return Value:
No Return Value.
Browser Support
Chrome | Edge | Firefox | Safari | Opera |
---|---|---|---|---|
Chrome | Edge | Firefox | Safari | Opera |
Supported | Not Supported | Supported | Supported | Supported |
Note:In Safari, you must enter a number in the numeric field before you can increase the value.