入力番号stepUp()メソッド
例
数値フィールドの値を5ずつインクリメントします。
document.getElementById("myNumber").stepUp(5);
定義と使用法
stepUp()メソッドは、数値フィールドの値を指定された数値だけインクリメントします。
ヒント:値をデクリメントするには、 stepDown()メソッドを使用します。
ブラウザのサポート
Method | |||||
---|---|---|---|---|---|
stepUp() | Yes | Not supported | Yes | Yes | Yes |
注: Safariでは、値をインクリメントする前に、数値フィールドに数値を入力する必要があります。
構文
numberObject.stepUp(number)
パラメータ値
Parameter | Description |
---|---|
number | Required. Specifies the amount the value of the number field should increase. If omitted, the numbers are incremented by "1" |
技術的な詳細
戻り値: | 戻り値なし |
---|
その他の例
例
数値フィールドの値を1インクリメントします(デフォルト):
document.getElementById("myNumber").stepUp();
❮入力番号オブジェクト