2012-06-25 55 views
0

我有多選列表框,我想清除所有選定的項目清除按鈕單擊。如何使用jQuery取消選中所有複選框?

<asp:ListBox id="StatusField" runat="server" SelectionMode="Multiple" Rows="4" /> 

我嘗試如下。

$("#StatusField option:selected").removeAttr("selected"); 
+1

你的代碼是不是下拉列表複選框 – Blaster

+0

可能重複[Javascript或jQuery來檢查並取消所有複選框(http://stackoverflow.com/questions/8730471/javascript-or-jquery-to-check - 取消選中所有複選框) – Esailija

+0

可能的重複[在jQuery中取消選擇