开发者

How to do auto complete in city textbox

开发者 https://www.devze.com 2022-12-28 09:31 出处:网络
I have state and city dropdown list in an ASP.NET 3.开发者_运维技巧5 application. However, I want city as a textbox, and upon me typing in it, autocomplete mode should occur.

I have state and city dropdown list in an ASP.NET 3.开发者_运维技巧5 application. However, I want city as a textbox, and upon me typing in it, autocomplete mode should occur.

I want to implement it through jQuery, so can anyone please send me the code for this?


http://docs.jquery.com/UI/Autocomplete


$("#yourtextboxID").autocomplete({source: ["Los Angeles","Las Vegas","Madrid"]});


The most straightforward way is to use the jQuery Autocompleye plugin.

If that doesn't tickle your fancy, try checking out this question. If you're having problems specifically with Asp.NET in conjunction with jQuery and AJAX, it looks like this question may be of use as well.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号