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.

セレクトボックスを作る

Posted at

サンプルコード

選択してください セレクト1 セレクト2 セレクト3

以下は説明
select要素

属性: name=""
値:文字列
説明:部品の名前を指定

属性:size=""
値:行数
説明:表示行数を指定
この属性の値に 1 を指定するとプルダウン形式のメニューになり、2 以上を指定するとリスト形式のメニューになります。(この属性を指定しない場合は、1 を指定した時と同じになります)

属性:multiple
値は不要
説明:複数選択を可能にする
Windowsの場合は、ShiftまたはCtrlキーを押しながらクリックすると、複数を選択することができます。

option要素

属性:value=""
値:文字列
説明:送信される文字列を指定
この属性を省略した場合は、option要素内のテキストが送信されることになります。

属性:selected
値は不要
説明:選択された状態を指定

属性:disabled
値は不要
説明:部品を無効化する
この属性が指定された部品は、選択することができなくなります。

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?