Run ยป
<!DOCTYPE html> <html> <head> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script> <script> $(document).ready(function() { $("input[type='radio']").change(function() { if ($(this).val() == "other") { $("#otherAnswer").show(); } else { $("#otherAnswer").hide(); } }); }); </script> </head> <body> No <input type="radio" name="answer" checked="checked" value="no" /> <br><br> Yes <input type="radio" name="answer" value="yes" /> <br><br> Other <input type="radio" name="answer" value="other" /><br> <input style="display:none;" type="text" name="otherAnswer" id="otherAnswer" /> </body> </html>