Wednesday, July 30, 2014

Validation for radio button

<script>
function send()
{
var genders = document.getElementsByName("genders");
if ( (genders[0].checked == false) && (genders[1].checked == false) && (genders[2].checked == false) && (genders[3].checked == false)) {
alert("it is empty");
return false;
}
return true;
}
</script>

No comments:

Post a Comment