Home » ★HTMLタグリファレンス

★HTMLタグリファレンス

<INPUT type=”text”> …… 一行テキストボックスを作成する
Internet Explorer4Internet Explorer5Internet Explorer5-macInternet Explorer5.5Internet Explorer6Internet Explorer7Internet Explorer8Internet Explorer9
Netscape4Netscape6Netscape7Netscape8
Opera6Opera7Opera8Opera9Opera10
Firefox1Firefox2Firefox3Firefox4
Google Chrome1Google Chrome2Google Chrome3Google Chrome4Google Chrome5Google Chrome6
広告



このページでは、HTML5のinput要素のtype=textを解説しています。
input要素のtype=textの最新情報は、以下を参照してください。

<input>タグのtype属性でtype=”text”を指定すると、一行テキストボックスが作成されます。

name属性は入力欄に名前を付ける属性ですが、<form>でデータが送信される際、
name属性で指定した名前と入力された値が一組になって送信されます。

size属性とmaxlength属性はそれぞれ、一行テキストボックスの表示サイズと、入力できる最大文字数を指定します。

■属性

type=”text”
一行テキストボックスを作成する
name
フォーム部品に名前をつける
value
送信される値を指定する
size
フォーム部品のサイズを指定する
maxlength
入力できる最大文字数を指定する

■使用例

HTMLソース

<form action=”cgi-bin/abc.cgi” method=”post”>
<p>
名前:<input type=”text” name=”namae” size=”40″ maxlength=”20″>
</p>
<p>
<input type=”submit” value=”送信する”>
</p>
</form>

↓↓↓

ブラウザ上の表示

名前:

■HTML5情報

<input type=”text”> …… 一行テキストボックスを作成する
広告



Lorem Ipsum is simply dummy text

    By signing up, you agree to our Terms and Privacy Policy. Unsubscribe anytime.