I have tried to get the value of the selected option as,var
doma=$('#domain_picker_select').find('option:selected').text();
OR
var doma=$('#domain_picker_select').val();
but i am getting the output as undefined, please help me to get the values for the option been selected for the select choice.
<select name="domain_picker_select"ng-options="domain.value as domain.label for domain in domains.list" id="domain_picker_select">
<option label="global" value="string:global" selected="selected">global</option>
<option label="TOP/Comm" value="string:6b16be7e6f72710f6">TOP/GBP/Comm</option>
<option label="TOP/Custom" value="string:e15e65256f9bd23">TOP/Custom</option>
</select>
To get value, you use val()
$("#domain_picker_select").val();
It work good! https://codepen.io/anon/pen/ZBNxPo
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With