$('input[type=radio][name=gender]').change(function() { if (this.value == 1) { alert("Select Male"); }else if (this.value == 2) { alert("Select Female"); } });