How to get the selected value of MS Drop-down list

2019-03-07 03:31发布

I have used MS Dropdown list in my MVC Project. Now I want to get the MS Dropdownvalue using Jquery. How can achieve that?

$("#Country").msDropdown();

I want to get the selected value of INDIA using JQuery.

var countryName = $("#Country option:selected").val();

It does not seem to be working.

1条回答
女痞
2楼-- · 2019-03-07 04:29

Use

var countryName = $("#Country option:selected").text();

instead of

var countryName = $("#Country option:selected").val();
查看更多
登录 后发表回答