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 select field.
It would appear it only works if I reference the ID.
How do I do it using this.
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 select field.
It would appear it only works if I reference the ID.
How do I do it using this.
Note that if these are not working, it might be because the DOM has not loaded and your element was not found yet.
To fix, put the script at the end of body or use document ready