0

Bootstrap selectpicker javascript 函数在 asp 中不起作用。

Javascript代码:

<script type="text/javascript">
       $(document).ready(function () {
           $('.selectpicker').selectpicker();
       });
 </script>

ASP代码:

<asp:DropDownList ID="DropDownList2" CssClass="selectpicker" data-style="btn-danger" runat="server">
    <asp:ListItem>Action</asp:ListItem>
    <asp:ListItem>Another action</asp:ListItem>
    <asp:ListItem>Something else here</asp:ListItem>
    </asp:DropDownList>
4

1 回答 1

1

利用$('.dropdown-toggle').dropdown();

于 2014-09-01T11:26:14.380 回答