开发者

Implementing autocomplete in HTML input

开发者 https://www.devze.com 2023-03-18 12:13 出处:网络
I devise a web site. I am using PHP, XML and HTML. There is input forms in my HTML files and I want to implement auto-suggestion in input forms.

I devise a web site. I am using PHP, XML and HTML. There is input forms in my HTML files and I want to implement auto-suggestion in input forms. When you enter search phrase to google's input form, ma开发者_Go百科ny suggestions appeared in your browser. I exactly want to implement this.

What must I do? Which language/interface/information I need to?

thanks in advance.


Autocomplete is done via JavaScript. Check out the jQuery Autocomplete plugin for a pretty easily library to get started with. You can either include the values to be used for autocomplete in the JavaScript, or you can make an AJAX request to a PHP script which provides suggestions. Feel free to comment if you'd like more help.


This will be the easiest way to get it done...

http://jqueryui.com/demos/autocomplete/


JQuery UI is a javascript framework that has a nice autocomplete implementation: http://jqueryui.com/demos/autocomplete/

Of course you will need the jquery and jquery ui javascript frameworks.

0

精彩评论

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