0
1

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 3 years have passed since last update.

入力フォームを使いやすくするHTML(備忘録)

Last updated at Posted at 2021-01-20

電話番号を入力時に数字キーボードを表示する

EoE6kTGVcAE9wLz.jpeg

<input type="tel">

type="tel"を入れることでキーボードが数字入力になります。
チェックボックスの選択部分を文章もまるごとにする

EoE6lMjVcAImnVM.jpeg

<label>
  <input type="checkbox" >選択肢A
</label>

<label>タグで囲むことでテキスト部分も選択範囲として認識します。

自動入力機能をつかう

EoE6mBsVkAAUvIs.jpeg

<input type="text" autocomplete="street-address" >

こちらで指定した入力候補を出す

EoE6mymVcAE1wuo.jpeg

<input type="text" list="samplelist" >
<datalist id="samplelist">
  <option value="埼玉県"></option>
  <option value="東京都"></option>
  <option value="神奈川県"></option>
</datalist>

参考

池田泰延さんTwitter

0
1
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
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?