<script type=”text/javascript”>
if($(“span”).css(“color”) != “red”){
$(“input[name=’name’]”).css(“border”,”1px solid #FF0000″).after(“<span>お名前を入力してください</span>”);
return false;

<form action=”” method=”post”>
<dd><input name=”name” type=”text” /></dd>
<input name=”gender” type=”radio” value=”男性” id=”gender_man”/>
<label for=”gender_man”>男性</label>
<input name=”gender” type=”radio” value=”男性” id=”gender_woman”/>
<label for=”gender_woman”>女性</label>
<select name=”age” >
<option value=”10代”>10代</option>
<option value=”20代”>20代</option>
<option value=”30代”>30代</option>
<option value=”40代以上”>40代以上</option>
<input name=”xhtml” type=”checkbox” value=”xhtml” id=”xhtml” />
<label for=”xhtml”>XHTML</label>
<input name=”css” type=”checkbox” value=”css” id=”css” />
<label for=”css”>CSS</label>
<input name=”javascript” type=”checkbox” value=”javascript” id=”javascript” />
<label for=”javascript”>javascript</label>
<input name=”php” type=”checkbox” value=”php” id=”php” />
<label for=”php”>php</label>
<dd><textarea name=”comment” cols=”” rows=””></textarea>
<input  type=”submit” value=”送信” />


This entry was written by admin , posted on 木曜日 5月 26 2011at 02:05 pm , filed under Form and tagged , . Bookmark the permalink . Post a comment below or leave a trackback: Trackback URL.

Comments are closed.