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

★HTMLタグリファレンス

<INPUT type=”image”> …… フォームの画像ボタンを作成する
Internet Explorer4Internet Explorer5Internet Explorer5-macInternet Explorer5.5Internet Explorer6Internet Explorer7Internet Explorer8Internet Explorer9
Netscape4Netscape6Netscape7Netscape8
Opera6Opera7Opera8Opera9Opera10
Firefox1Firefox2Firefox3Firefox4
Google Chrome1Google Chrome2Google Chrome3Google Chrome4Google Chrome5Google Chrome6
広告



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

<input>タグのtype属性の値にimageを指定すると、フォームの画像ボタンを作成します。
画像ファイルはsrc属性で指定します。画像ボタンにはalt属性が必須となります。

■属性

type=”image”
画像ボタンを作成する
name
ボタンに名前をつける
src
ボタンに使用する画像ファイルのURIを指定する
alt
ボタン画像の代替テキストを指定する

■使用例

HTMLソース

<form action=”cgi-bin/abc.cgi” method=”post”>
<p>
名前:<input type=”text” name=”namae”>
</p>
<p>
<input type=”image” src=”https://htmqcom1.wpengine.com/wp-content/themes/twentytwentyone-child/htmq-images/kaeru.png” alt=”押してケロ♪”>
</p>
</form>

↓↓↓

ブラウザ上の表示

名前:

■HTML5情報

<input type=”image”> …… 画像ボタンを作成する
広告



Lorem Ipsum is simply dummy text

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