2012-02-14 71 views

回答

5

像這樣:

var $select_array = $('select'); 
+0

+1好回答隊友;-) – 2012-02-14 15:22:49

+0

感謝您的幫助,完美的作品! – Anupam 2012-02-15 15:11:02

0

這將做魔術:

var allSelects = $('select'); 
0

您可以使用類似這樣的東西。

var dropdowns = []; 

    $('option').each(function(){ 
     dropdown.push($(this)) 
    }); 
0

如果你想檢索所有各種下拉頁面上列出所做的選擇,你會做這樣的:

var selections = [] 

jQuery('select').each(function(){ 
    selections.push(jQuery(this).val()); 
}); 

見我的工作example

相關問題