Created
October 9, 2012 05:15
-
-
Save imjjss/3856753 to your computer and use it in GitHub Desktop.
get value from selction
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//single selction | |
$(‘#selectList’).val(); | |
//get text of the option | |
$(‘#selectList :selected’).text(); | |
//from multi selction | |
var foo = []; | |
$(‘#multiple :selected’).each(function(i, selected){ | |
foo[i] = $(selected).text(); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment