带搜索框的下拉菜单

1.样式引用:

    <link rel="stylesheet" href="~/Js/Ddl_Chosen/chosen.css" />

2.由于应用了Jquery,所以引用Jquery。(下载地址)

        <script src="<%= ResolveUrl("~/Js/Jquery.js")%>" type="text/javascript"></script>

3.相关Js配置

        <asp:DropDownList ID="ddlCountry" runat="server" data-placeholder="Choose a Country..."
            Width="200px" class="chzn-select">
        </asp:DropDownList>

        <script src="<%= ResolveUrl("~/Js/Ddl_Chosen/chosen.jquery.js")%>" type="text/javascript"></script>

        <script type="text/javascript"> 
          $(".chzn-select").chosen(); 
        </script>

4.相关Js下载地址

下载

5.效果图:

posted @ 2013-05-06 09:10  爱智旮旯  阅读(1370)  评论(4编辑  收藏  举报