Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

js check if radio button is checked

if(document.getElementById('gender_Male').checked) {
  //Male radio button is checked
}else if(document.getElementById('gender_Female').checked) {
  //Female radio button is checked
}
Comment

check if one of the radio button is checked


      if ($('input[name='+ radioName +']:checked').length) {
           // at least one of the radio buttons was checked
           return true; // allow whatever action would normally happen to continue
      }
      else {
           // no radio button was checked
           return false; // stop whatever action would normally happen
      }
    
Comment

PREVIOUS NEXT
Code Example
Javascript :: delete empty values from object js 
Javascript :: array reverse without mutating 
Javascript :: how to check if a json object contains a key in jquery 
Javascript :: get domain name javascript 
Javascript :: converting bytes into kb js 
Javascript :: load jquery in the browser code 
Javascript :: htmlWebpackPlugin.options.title 
Javascript :: noconflict jquery 
Javascript :: normalize css cdn 
Javascript :: move list items up and down using javascript 
Javascript :: jquery loop through list elements 
Javascript :: email validatore regex 
Javascript :: convert dict to json python 
Javascript :: coldfusion user defined function 
Javascript :: equivalent of useHistory in react 
Javascript :: justifycontent react native flatlist 
Javascript :: laravel jquery ajax post csrf 
Javascript :: how to iterate table rows in javascript 
Javascript :: install the same version of package in the package.json 
Javascript :: random string generator node js 
Javascript :: fibonacci series in javascript 
Javascript :: page redirect after a few seconds 
Javascript :: once page loaded run function 
Javascript :: query date range in mongodb 
Javascript :: jquery on blur 
Javascript :: generate random string in javascript 
Javascript :: Angular detecting escape key press 
Javascript :: jquery selected option text 
Javascript :: DNA Pairing solution 
Javascript :: how to fill false into array javascript 
ADD CONTENT
Topic
Content
Source link
Name
2+3 =