Input Number step Attribute

Definition and Usage

step The property sets or returns the value of the step attribute of the numeric field.

The HTML step attribute specifies the valid number interval of the numeric field.

Example: step="3"If so, the valid numbers can be -3, 0, 3, 6, etc.

Tip:The step property can be used with max and min Use properties together to create a series of valid values.

See also:

HTML Reference Manual:HTML <input> step ਪ੍ਰਤੀਯੋਗ

Example

Example 1

Get the valid number interval of the numeric field:

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

Try it yourself

Example 2

Change the valid number interval of the numeric field:

document.getElementById("myNumber").step = "5";

Try it yourself

Syntax

Return step property:

numberObject.step

set step property:

numberObject.step = number

ਪ੍ਰਤੀਯੋਗ ਮੁੱਲ

ਮੁੱਲ ਵਰਣਨ
number ਨੰਬਰ ਫੀਲਡ ਦੀ ਲਾਗੂ ਨੰਬਰ ਅੰਤਰ ਨੂੰ ਨਿਰਧਾਰਿਤ ਕਰੋ।ਮੂਲ ਮੁੱਲ 1 ਹੈ。

ਤਕਨੀਕੀ ਵੇਰਵੇ

ਵਾਪਸ ਮੁੱਲ: ਨਮੂਨਾ ਮਾਲਾ, ਅਨੁਮਾਨਿਤ ਨੰਬਰ ਫੀਲਡ ਦੀ ਲਾਗੂ ਨੰਬਰ ਅੰਤਰ ਨੂੰ ਪ੍ਰਦਰਸ਼ਿਤ ਕਰਦੀ ਹੈ。

ਬਰਾਉਜ਼ਰ ਸਮਰਥਨ

ਚਰਾਮ ਐਜ਼ਡ ਫਾਇਰਫਾਕਸ ਸੈਫਾਰੀ ਓਪਰਾ
ਚਰਾਮ ਐਜ਼ਡ ਫਾਇਰਫਾਕਸ ਸੈਫਾਰੀ ਓਪਰਾ
ਸਮਰਥਨ 10.0 ਸਮਰਥਨ ਸਮਰਥਨ ਸਮਰਥਨ