HTML input要素の型
input要素のtype属性の型
ボタン (input type button) |
|
|
---|---|---|
ファイル (input type file) |
form要素には「method=”post”」と「enctype=”multipart/form-data”」の指定をしておくようにします。
|
|
隠しデータ (input type hidden) |
|
|
画像送信ボタン (input type image) |
|
|
チェックボックス (input type checkbox) |
|
|
パスワード (input type password) |
|
|
ラジオボタン (input type radio) |
|
|
リセットボタン (input type reset) |
|
|
送信ボタン (input type submit) |
| |
一行テキスト (input type text) |
|
HTML5で追加されたinput要素の型
検索フォーム (input type search) |
|
---|---|
電話番号 (input type tel) |
|
URL (input type url) |
|
メール (input type email) |
|
日付:年月日 (input type date) |
|
日付:年月 (input type month) |
|
日付:年と週 (input type week) |
|
時間 (input type time) |
minで最小時間の指定ができて、maxで最大時間を指定して時間の入力範囲を指定できます。
|
年月日と時間 (input type datetime-local) |
|
番号 (input type number) |
|
スライダー (input type range) |
|
カラー (input type color) |
色の候補を作成して表示することもできます。
|