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

Class X IT notes: Part A, Unit 1, Session 1.

 IT notes class 10 Unit 1: COMMUNICATION SKILLS Session 1: METHODS & TYPES OF COMMUNICATION Q1. What is communication? Communication is ...