Trigger a click on checked radio button in jquery or javascript - Javascript jQuery

Javascript examples for jQuery:Form Button

Description

Trigger a click on checked radio button in jquery or javascript

Demo Code

ResultView the demo in separate window


<html>
   <head> 
      <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.0.2/jquery.min.js"></script> 
   </head> 
   <body> 
      <input type="radio" checked="sss"> 
      <script>
$(document).ready(function() {
var checked = $("input").attr("checked");
  if (checked == "checked") {
    console.log(22);
  }//from   w w  w  .  jav  a  2  s.  c o m
});

      </script>  
   </body>
</html>

Related Tutorials