jQuery Change Input text upon selection of radio button

前端 未结 5 509
借酒劲吻你
借酒劲吻你 2021-01-28 04:26

Trying to get the value=\"\" of to change upon selection of a radio button. So if the user

5条回答
  •  孤独总比滥情好
    2021-01-28 05:06

    Give the radio input a class of "option" or call it what ever

    
    

    Then the jquery:

    $('.option').click(function(){
       var thisRadio = $(this).val();
       $('.box').val(thisRadio);
    });
    

提交回复
热议问题