Sunday, March 31, 2019

How to get the value of selected radio button in a group using jQuery

    $(document).ready(function(){
        $("input[type='button']").click(function(){
            var radioValue = $("input[name='gender']:checked").val();
            if(radioValue){
                alert("Your are a - " + radioValue);
            }
        });
       
    });

No comments:

Post a Comment