<html>
<head>
<meta http-equiv="Content-Language" content="en-us">
<title>Check Test</title>
<script language="javascript">
function valBox()
{
var x = document.chkForm;
var i, flg = 0;
for( i=0; i<x.grp.length; i++ )
{
if(x.grp[i].checked)
flg=1;
}
if(!flg)
{
alert("Select One");
return false;
}
}
</script>
</head>
<body>
<form name="chkForm" method="POST" action="#" onsubmit="return valBox();">
<div align="center">
<table border="0" cellpadding="0" cellspacing="0" width="100%" id="table1">
<tr>
<td><input type="radio" value="V1" name="grp">1</td>
</tr>
<tr>
<td><input type="radio" value="V2" name="grp">2</td>
</tr>
<tr>
<td><input type="radio" value="V3" name="grp">3</td>
</tr>
<tr>
<td><input type="submit" value="Submit" name="B1"></td>
</tr>
</table>
</div>
</form>
</body>
</html>
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment