Change the value of the step attribute:
The step property sets or returns the value of the step attribute of a slider control.
The step attribute specifies the size of each movement (an increment or jump between values) of the slider control.
The step attribute is used to limit down the amount of allowed values.
Tip: The step attribute can be used together with the max and min attributes to create a range of legal values.
The step property is supported in all major browsers.
Note: The step property is not supported in Internet Explorer 9 and earlier versions.
Return the step property:
Set the step property:
Value | Description |
---|---|
number |
Specifies the size of each movement (an increment or jump between
values) of the slider control. Default is "1" |
Return Value: | A Number, representing the increment between values |
---|
Display the value of the step attribute of a slider control:
The result of x will be:
HTML reference: HTML <input> step attribute