Search
 
SCRIPT & CODE EXAMPLE
 

HTML

jquery radio button checked on page load

<input type='radio' name='gender' value='Male'>
<input type='radio' name='gender' value='Female'>
  ------------------------------------------
<script>
$(function() {
    var $radios = $('input:radio[name=gender]');
    if($radios.is(':checked') === false) {
        $radios.filter('[value=Male]').prop('checked', true);
    }
});
</script>
Comment

PREVIOUS NEXT
Code Example
Html :: dropzone 
Html :: contact us form html send email 
Html :: <!DOCTYPE html eslint error 
Html :: include jquery if not included 
Html :: html datetime format 
Html :: customize appearance of up/down arrows in html number inputs 
Html :: npm package private 
Html :: mat-icon outline 
Html :: How to make the scratch card by using HTML 
Html :: ramda js cdn 
Html :: Write html into file using Java dynamically 
Html :: vertical tabs bootstrap 
Html :: ml-auto not working 
Html :: how to work on portfolio in html and css 
Html :: like disLike 
Html :: iconos html 
Html :: square radio button in html 
Html :: a tag in html 
Html :: floating modal bootstrap 
Html :: web application vs website 
Html :: postcode input html 
Html :: how to add html in svg d3 
Html :: class not working react 
Html :: html number input with commas 
Html :: html meta 
Html :: html5 table 
Html :: how can we change background in loop img in webpages 
Html :: if the page is opened so count and put it to the value of hidden input 
Html :: html5 css3 
Html :: flexbox afbeeldingen 
ADD CONTENT
Topic
Content
Source link
Name
5+1 =