Source Code:
(back to article)
Submit
Result:
Report an issue
<!DOCTYPE html> <html> <head> <title>Title of the document</title> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.0/jquery.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() { $("#radio1").prop("checked", true); }); </script> </body> </html>