jQuery获取select onChange的值 - jQuery get value of select onChange

问题:

I was under the impression that I could get the value of a select input by doing this $(this).val(); 个人印象是我能够经过执行$(this).val();来获取选择输入的值$(this).val(); and applying the onchange parameter to the select field. 并将onchange参数应用于选择字段。 app

It would appear it only works if I reference the ID. 它彷佛只有在我引用ID时才有效。 this

How do I do it using this. 我该怎么作呢。 spa


解决方案:

参考一: https://stackoom.com/question/kuH0/jQuery获取select-onChange的值
参考二: https://oldbug.net/q/kuH0/jQuery-get-value-of-select-onChange
相关文章
相关标签/搜索