Wednesday, April 15, 2020

JavaScript Radio button validation

var option=document.getElementsByName('Gender');
if (!(option[0].checked || option[1].checked)) {
    alert
("Please Select Your Gender");
   
return false;
}

source https://stackoverflow.com/questions/10339073/radio-button-validation-in-javascript

No comments:

Post a Comment

The double-slit experiment to illustrates wave interference pattern, and diffraction.

  The double-slit experiment primarily illustrates wave interference , though diffraction plays a critical role as the waves bend around ea...