jQuery get value of select onChange

后端 未结 16 1799
星月不相逢
星月不相逢 2020-11-22 05:31

I was under the impression that I could get the value of a select input by doing this $(this).val(); and applying the onchange parameter to the sel

16条回答
  •  不知归路
    2020-11-22 05:57

    jQuery get value of select html elements using on Change event

    For Demo & More Example

    $(document).ready(function () {   
        $('body').on('change','#select_box', function() {
             $('#show_only').val(this.value);
        });
    }); 
      
      
    jQuery Select OnChnage Method
     
         
      
      
    
    

提交回复
热议问题