如何为以下方案实现自动完成

How to implement autocomplete for the following scenario

本文关键字:实现 方案      更新时间:2023-09-26

我正在寻找针对以下情况的auto complete解决方案:

我的页面有一个dropdownlisttextbox

   <table>
    <tr>
    <td>
        <asp:DropDownList ID="ddlRegions" runat="server"></asp:DropDownList> 
    </td>
    <td>
        <label>Enter Iso:</label>
        <asp:TextBox ID="txtIso" runat="server"></asp:TextBox>
    </td>
    <td>
    </tr>
    </table>

我需要在输入 4 个字符后为我的textbox实现autocomplete未来。文本框将需要根据从dropdownlist中选择的选项显示一些数据。

输入值时,我需要显示不超过 10 个选项textbox

我想我需要使用jqueryajaxwebservice呼吁。

我怎样才能完成这样的事情?

谢谢的

只需从如下所示的链接下载 typeahead.js 并包含在您的应用程序中:http://twitter.github.io/typeahead.js/examples/此外,你必须包括jQuery。