form練習

form練習

その1

ユーザー名:

パスワード:

好きな果物:りんごぶどう

性別:malefemale
コメント:
見えない入力欄:

ユーザー名:<input type="text" name="username" placeholder = "username"><br><br>
パスワード:<input type="password" name="password" placeholder = "password"><br><br>
好きな果物:<input type="checkbox" name="fruits[]" checked>りんご<input type="checkbox" name="fruits[]" >ぶどう<br><br>
性別:<input type="radio" name="sex" checked>male<input type="radio" name="sex">female<br>
コメント:<textarea name="comments", placeholder = "sample"></textarea><br>
見えない入力欄:<input type="hidden" name="token"><br>
<input type="submit" value="送信">

その2

<form method="post"><label>メール(type="email"):<input type="email" name="email"></label><input type="submit" value="送信"></form>
<form method="post"><label>URL(type="url"):<input type="url" name="url"></label><input type="submit" value="送信"></form>
<form method="post"><label>検索(type="search"):<input type="search" name="search"></label><input type="submit" value="送信"></form>
<form method="post"><label>電話(type="telephone"):<input type="tel" name="tel"></label><input type="submit" value="送信"></form>
<form method="post"><label>数値(type="number"):<input type="number" name="number"></label><input type="submit" value="送信"></form>
<form method="post"><label>日付(type="date"):<input type="date" name="date"></label><input type="submit" value="送信"></form>
<form method="post"><label>日時(type="datetime"):<input type="datetime" name="datetime"></label><input type="submit" value="送信"></form>
<form method="post"><label>ローカル日時(type="datetime-local"):<input type="datetime-local" name="datetime-local"></label><input type="submit" value="送信"></form>
<form method="post"><label>月(type="month"):<input type="month" name="month"></label><input type="submit" value="送信"></form>
<form method="post"><label>週(type="week"):<input type="week" name="week"></label><input type="submit" value="送信"></form>
<form method="post"><label>時間(type="time"):<input type="time" name="time"></label><input type="submit" value="送信"></form>
<form method="post"><label>レンジ(type="range"):<input type="range" name="range"></label><input type="submit" value="送信"></form>
<form method="post"><label>色(type="color"):<input type="color" name="color"></label><input type="submit" value="送信"></form>