0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

JavaScriptで<input type="range">の範囲とstepを設定する方法

0
Posted at
HTML
<input type="range">

この要素の範囲とstepを設定するには、

JavaScript
//elementは上の要素を取得したもの

element.min = 0; //最小値を0に設定
element.max = 100; //最大値を100に設定
element.step = 10; //移動幅を10に設定

のようにすることで設定できます。

最後に

前にこれをやろうとしたときに、調べても方法がわからず結局できなかったのですが、方法が見つかったので記事を書きました。誰かの役に立てればうれしいです。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?