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.
This is helped for me.
For select:
For radio/checkbox:
For all selects, invoke this function.
For only one select:
You can try this (using jQuery)-
Or you can use simple Javascript like this-
Look for jQuery site
HTML:
JAVASCRIPT:
jQuery's example:
To add a validity test to all text input elements: