Get selected value of dropdown in jquery on change

We Are Professional

Get selected value of dropdown in jquery on change

How do I get the text value of a selected option?
Ok, just use:
[sourcecode language=”plain”]var value = $(‘#dropDownId’).val();[/sourcecode]

Now, you can check the “value” like:
[sourcecode language=”plain”]if (value ==”) {
alert(‘Please select any item’);
return(false);
}[/sourcecode]

Information

WebinBangla is a leading web solution provider and we work globally. Wel make sure our clients and customers avail maximum benefits by using our high quality services and complete packages.

  • Address: Pahartoli, Raozan, Chittagong.
  • Email: mamun005cse@gmail.com
  • Phone: +880 1738 914871

Working Hours

  • Monday - Friday - 9am to 5pm
  • Saturday - 9am to 2pm
  • Sunday - Closed