Input Week stepDown() 方法

定义和用法

stepDown() 方法将星期字段的值递减指定的数字。

此方法只会对星期(而不是年)产生影响。

提示:如需增加值,请使用 stepUp() 方法

实例

例子 1

将星期字段的值减少 10 周:

document.getElementById("myWeek").stepDown(10);

亲自试一试

例子 2

将周数减 1(默认):

document.getElementById("myWeek").stepDown();

亲自试一试

语法

weekObject.stepDown(number)

参数值

参数 Description
number

Required. Specifies the number of weeks to reduce the week field.

If omitted, the number of weeks is reduced by "1".

Technical details

Return value:

No return value.

Browser support

The numbers in the table indicate the first browser version that fully supports this property.

Chrome Edge Firefox Safari Opera
Chrome Edge Firefox Safari Opera
Supported 12.0 Not supported Supported Supported

Note:In Safari, you must enter the week field and then you can reduce the value.