目次 < 名前順要素一覧 戻る

バナー

中年おっちゃんでも出来た ウェブページ作成講座 with ? mark

FORM要素の使用例

FORM要素 FIELDSET要素 LEGEND要素 FORM部品要素 を使用して、アンケートらしき物を作成しました。
宜しければ、各項目を入力して送信して下さい。

貴方について
性別    
趣味

  

上記入力フォームのHTML記述

スタイルシートスクリプト の記述は外しています

<form action="/cgi-bin/form/mailformlog.cgi" method="post" id="fmtst" name="fmtst">
<p>
<input type="hidden" name="mailto" value="送信先のメールアドレス" />
:
<input ・・・・ />
</p>
<fieldset>
<legend accesskey="9">貴方について</legend>
<tabletable summary="#">
<tr><td>
<label for="name">お名前 (1)</label>
</td><td>
<input id="name" name="お名前" size="30" value="" tabindex="1" accesskey="1" />
</td></tr>
<tr><td>
<label for="mead">メールアドレス (2)</label>
</td><td>
<input id="mead" name="メールアドレス" size="30" value="" tabindex="2" accesskey="2" />
</td></tr>
<tr><td>
性別
</td><td>
<input type="radio" name="性別" value="男性" id="rei1" tabindex="3" />
<label accesskey="m" for="rei1">男性 (M)</label>
<input type="radio" name="性別" value="女性" id="rei2" tabindex="3" />
<label accesskey="w" for="rei2">女性 (W)</label>
<input type="radio" name="性別" value="?" id="rei3" tabindex="3" checked="checked" />
<label accesskey="?" for="rei3">? (?)</label>
</td></tr>
<tr><td>
趣味
</td><td>
<label>
<input type="checkbox" name="趣味" value="酒" tabindex="4" accesskey="3" />酒 (3)
</label>
<label>
<input type="checkbox" name="趣味" value="煙草" tabindex="5" accesskey="4" />煙草 (4)
</label>
<label>
<input type="checkbox" name="趣味" value="男" tabindex="6" accesskey="5" />男 (5)
</label>
<label>
<input type="checkbox" name="趣味" value="女" tabindex="7" accesskey="6" />女 (6)
</label>
<label>
<input type="checkbox" name="趣味" value="その他" tabindex="8" accesskey="7" />その他 (7)
</label>
</td></tr>
<tr><td>
<label for=job">職業</label>
</td><td>
<select id="job" size="4" name="職業" tabindex="9">
<option>会社員</option>
<option>主婦</option>
<option>学生</option>
<option checked="checked">その他</option>
</select>
</td></tr>
</table>
</fieldset>
<p>
<textarea name="comment" rows="6" cols="60" tabindex="10" accesskey="8">
このサイトの感想等を記入して下さい。(8)
</textarea>
</p>
<p>
<input type="submit" tabindex="11" accesskey="s" value="送信 (S)" />
<button type="reset" tabindex="12" accesskey="r">リセット (R)</button>
</p>
</form>

目次 < 名前順要素一覧 戻る Top

Created:Jun 01, 2005 Updated:Oct.,25,2011 © by おっちゃん
Oct.,25,2011 全面更新