jQuery Change Input text upon selection of radio button

前端 未结 5 546
借酒劲吻你
借酒劲吻你 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 04:54

    Really Simple fiddle.

    Using code:

    $(document).ready(function(){
      $("input[type=radio]").click(function(){
         $("#it").val(this.value);
      }); 
    });
    

    And HTML:

    
    
    
    
    

    This demonstrates the concept of how to do it.

提交回复
热议问题