Answers for "javascript to change value on screen with radio button"

0

javascript to change value on screen with radio button

$(document).ready(function(){
    $('input[name=content_type]').on('change', function(){
    var n = $(this).val();
    switch(n)
    {
            case '1':
                  $('#show').html("1st radio button");
                  break;
            case '2':
                  $('#show').html("2nd radio button");
                  break;
            case '3':
                  $('#show').html("3rd radio button");
                  break;
        }
    });
});
Posted by: Guest on July-27-2021

Code answers related to "javascript to change value on screen with radio button"

Code answers related to "Javascript"

Browse Popular Code Answers by Language