THE WORLD'S LARGEST WEB DEVELOPER SITE
HTMLCSSJAVASCRIPTSQLPHPBOOTSTRAPJQUERYANGULARXML
 

Input Range step Property

Input Range Object Reference Input Range Object

Example

Change the value of the step attribute:

document.getElementById("myRange").step = "25";
Try it Yourself »

Definition and Usage

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.


Browser Support

Internet Explorer Firefox Opera Google Chrome Safari

The step property is supported in all major browsers.

Note: The step property is not supported in Internet Explorer 9 and earlier versions.


Syntax

Return the step property:

rangeObject.step

Set the step property:

rangeObject.step=number

Property Values

Value Description
number Specifies the size of each movement (an increment or jump between values) of the slider control.
Default is "1"

Technical Details

Return Value: A Number, representing the increment between values

More Examples

Example

Display the value of the step attribute of a slider control:

var x = document.getElementById("myRange").step;

The result of x will be:

10
Try it Yourself »

Related Pages

HTML reference: HTML <input> step attribute


Input Range Object Reference Input Range Object