Get value of select option immediately jquery

后端 未结 4 1599
暗喜
暗喜 2021-01-29 02:16

I have a simple dropdown and want to get the specific value of an option if the user changes the dropdown selection, but without having him to push a submit button. Is this poss

4条回答
  •  爱一瞬间的悲伤
    2021-01-29 02:47

    Check your JQuery include, you must not be including Jquery correctly. What version are you referencing?

    Ensure you are running your script when JQuery is loaded:

    $(document).ready(function () {
      $('#BezirksAuswahl').change(function(e){
         alert(this.value);
      });
    });
    

提交回复
热议问题