入力月stepDown()メソッド
例
月フィールドの値を3か月減らします。
document.getElementById("myMonth").stepDown(3);
定義と使用法
stepDown()メソッドは、月フィールドの値を指定された数だけデクリメントします。
この方法は、月(年ではなく)にのみ影響します。
ヒント:値をインクリメントするには、stepUp()メソッドを使用します。
ブラウザのサポート
Method | |||||
---|---|---|---|---|---|
stepDown() | Yes | 12.0 | Not supported | Yes | Yes |
構文
numberObject.stepDown(number)
パラメータ値
Parameter | Description |
---|---|
number | Required. Specifies the amount of months the month field should decrease. If omitted, the months are decremented by "1" |
技術的な詳細
戻り値: | 戻り値なし |
---|
その他の例
例
月フィールドの値を1デクリメントします(デフォルト):
document.getElementById("myMonth").stepDown();
❮入力月オブジェクト