If radio button is check display a textbox Jquery

前端 未结 5 684
北海茫月
北海茫月 2021-01-28 03:08

Hey Ya\'ll I have got a question with my radio buttons I have these 3 buttons

No  
         


        
5条回答
  •  北海茫月
    2021-01-28 03:39

    I think this is more effective.

    $("input[name='answer']").change(function(){
    
        if($(this).val() == "yes")
        {
            $("#otherAnswer").show();
        }else{
            $("#otherAnswer").hide();
        }
    });
    

提交回复
热议问题