ライブラリを読み込む
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html lang="ja">
<head>
<meta http-equiv="content-type" content="text/html;charset=utf-8">
<title>Sample</title>
<link rel="stylesheet" href="css/style.css" type="text/css" media="all">
<link rel="stylesheet" href="css/main.css" type="text/css" media="all">
<script type="text/javascript" src="js/prototype.js" charset="shift_jis"></script>
<script type="text/javascript" src="js/effects.js" charset="shift_jis"></script>
<script type="text/javascript" src="js/validation.js" charset="shift_jis"></script>
<script type="text/javascript"><!--
Event.observe(window, "load", function(){
new Validation("rForm");
}, true);
// --></script>
</head>
<body>
<h1>入力チェック</h1>
<form id="rForm" name="rForm" method="get" action="./check.cgi">
名前:<input type="text" name="uName" id="uName" class="required"><br>
年齢:<input type="text" name="uAge" id="uAge" class="required validate-number"><br>
<div>
<input type="radio" id="male" name="sType" value="male">男性<br>
<input type="radio" id="female" name="sType" value="female" class="validate-one-required">女性<br>
</div>
<input type="submit" value="送信"><br>
</form>
</body>
</html>
説明などは本書を参考にしてください。