Javascript Example
Screen shot
Javascript CheckBox Validation
<html>
<head>
<title>Javascript Example</title>
<script language=\"javascript\" type=\"text/javascript\">
function validate()
{
var str=true;

document.getElementById(\"msg\").innerHTML=\"\";

if(document.frm.hobby1.checked || document.frm.hobby2.checked || document.frm.hobby3.checked || document.frm.hobby4.checked)
{
str=true;
}
else
{
document.getElementById(\"msg\").innerHTML=\"Please select any one\";
str=false;
}

return str;

}
</script>
</head>

<body>
<form name=\"frm\" action=\"\" method=\"post\" onSubmit=\"return validate();\">

Play Football<input name=\"hobby1\" type=\"checkbox\" value=\"play_football\" /><br>
Play Music<input name=\"hobby2\" type=\"checkbox\" value=\"play_music\" /><br>
Listen Music<input name=\"hobby3\" type=\"checkbox\" value=\"listen_music\" /><br>
Reading Newspaper<input name=\"hobby4\" type=\"checkbox\" value=\"reading_newspaper\" />

<div id=\"msg\" style=\"color:#FF0000\"></div>
<input name=\"btn\" type=\"submit\" value=\"submit\">
</form>
</body>
</html>

You can download source code here