Home  >  Article  >  Web Front-end  >  JS sample code to implement automatic matching function of imitating Baidu input box_javascript skills

JS sample code to implement automatic matching function of imitating Baidu input box_javascript skills

WBOY
WBOYOriginal
2016-05-16 16:59:401215browse

Many websites now have this effect. Enter a character in the text box, and the matching content will appear below. This code demonstrates how this function is completed. Of course, this is static. You can change the prompt The content is read from the database, which requires the use of AJAX.

Copy code The code is as follows:



带输入匹配的文本框











请在输入框输入一个字母:



Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn