js 取消listbox选中的项

   <input type="button" id="cel" value="取消选择" onclick="clearListBox()" />
       <asp:ListBox ID="lstCoprate" runat="server"  Height="138px" Width="88px"  SelectionMode="Multiple" Font-Size="16px" >
       </asp:ListBox>

  function clearListBox(){
            $(document).ready(function(){
            $("#cel").click(function(){
            $("#lstCoprate").get(0).selectedIndex=-1;
            });
        });

你可能感兴趣的:(listbox)