How do I get all the options (text,not the value) of a select menu by by specifying its id
var textArr = $("#mySelect").map(function() {
return $(this).text();
}).get();
alert(textArr);
Demo here. And see http://api.jquery.com/map/
How do I get all the options (text,not the value) of a select menu by by specifying its id
var textArr = $("#mySelect").map(function() {
return $(this).text();
}).get();
alert(textArr);
Demo here. And see http://api.jquery.com/map/
求陪你长大歌词。?:下一篇
精彩评论