tags:

views:

50

answers:

3
<select>
<option>test</option>
<option>test1</option>
</select>

In fact I'm going to retrieve the innertext of <option>,but these two jobs are similar.

+2  A: 
$("select option").each(function() { 
    $(this).text(); //do something with this text
});

or if you want a concatenated string of all options then its simply

$("select option").text();

if you want values - as in value attribute of option (<option value="x">text</option>) then replace the text() function in the code above with val()

Darko Z
+1  A: 
 var opt_vals = [];
 $( 'select option' ).each( function() {
   opt_vals.push( ( $this ).text() );
 }
Jacob Relkin
A: 

With the HTML you provided, I'd just use this:

var opt_vals = $('select').text().trim().split('\n');
fudgey