the following code gives me an alert with the selected value on page load
var itemLevel = $('Select[title=Item Level] option:selected').text();
alert(itemLevel);
But how do I do it if the user selects another value in the dropdown list and I want a new pop up with that value instead?
Thanks in advance.
Try this:
Or based on name:
The
*=means get select box in whose name there isDropDownChoicesomewhere.If you want to get the
textof selected option instead, usetext()instead ofval()eg:Update:
You can do like this: