Change Text Box Value Based on Select Input with Selected Attribute

后端 未结 7 1136
再見小時候
再見小時候 2020-12-14 23:03

I am attempting to change the value of a text input based on the user selecting a value from a pulldown. I have got it working using the following,



        
7条回答
  •  無奈伤痛
    2020-12-15 00:07

    $(document).ready(function() {                                       
        $("#name").live("change", function() {
          $("#firstname").val($(this).val());
        })
     }); ​
    

提交回复
热议问题