戻る

:resetフィルター

jQuery

<!DOCTYPE html>
<html lang="ja-JP">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,user-scalable=yes,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.5">
<title></title>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
<script>
$(function(){
	$(":reset").one("click",function(){
		$(this).after("<p>入力内容を初期化しました</p>");
	});
});
</script>
<body>
<form action="#">
<dl>
	<dt>お名前<em>(必須)</em></dt>
	<dd><input type="text" name="name"></dd>
	<dt>コメント</dt>
	<dd>
		<textarea name="comment"></textarea>
	</dd>
	<dd><input type="reset" value="リセット"></dd>
</form>
</body>
</html>

inserted by FC2 system