step property
Defines an increment or jump between values that you want to allow the user to enter. When used with the max and min attributes, lets you control the range and increment (for example, allow only even numbers) that the user can enter into an input field.
This property is read/write.
Syntax
HRESULT put_step(
[in] DOMString val
);
HRESULT get_step(
[out] DOMString **ptr
);
Property values
Type: DOMString
A string containing a numeric value.
Standards information
- HTML5 A vocabulary and associated APIs for HTML and XHTML, Section 4.10.7.3.11
Remarks
Anything outside that range or an odd number will not be submitted, and an error message will be displayed.
The following example shows the use of the min, max, and IHTMLInputRangeElement::step attributes.
<form>
<label>
Enter an even number between 0 and 100: <input title="Enter an even number" type="number" min="0" max="100" step="2"> <input type="submit">
</label>