val() .$('#selectList').val();
But sometimes you may need to get the selected option’s text. This is not as straight forward. First, we get the selected option with :selected selector. Then once we have the option, we can get the text with the function,text().
$$('#selectList :selected').text();
No comments:
Post a Comment