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;
            });
        });

posted @ 2014-03-06 11:14  码农小小强  阅读(365)  评论(0编辑  收藏  举报