Monday, April 10, 2017

jquery: dropdown

http://stackoverflow.com/questions/2780566/get-selected-value-of-a-dropdowns-item-using-jquery

For single select dom elements, to get the currently selected value:
$('#dropDownId').val();
To get the currently selected text:
$('#dropDownId :selected').text();

No comments:

Post a Comment

Followers

Blog Archive