Source Code:
(back to article)
Submit
Result:
Report an issue
<!DOCTYPE html> <html> <head> <title>Title of the document</title> <script src="https://code.jquery.com/jquery-1.5.min.js"></script> </head> <body> <input type='radio' id='radio1' name='type' value='1'>Value1 </input> <input type='radio' id='radio2' name='type' value='2'>Value2 </input> <input type='radio' id='radio3' name='type' value='3'> Value3 </input> <script> $(document).ready(function() { $("#radio3").attr('checked', 'checked'); }); </script> </body> </html>