set selected value of dropdown in jquery

In jQuery we get drop-down list selected by using .`val()` method. The first one is the value to be sent to the server, which can easily get using the jQuery. To trigger the change event, you can call the .change() or .trigger("change") method after setting the value.. Alternatively, you can use the .prop() method to set the selectedIndex property which reflects the index of the selected