JS text box Input content intelligent prompt effect _javascript skill

Source: Internet
Author: User

This example describes the JS text box input smart prompt effect code. Share to everyone for your reference. Specifically as follows:
The screenshot of the running effect is as follows:

General ideas:

1. Listen for text box events. Here is the use of the KeyUp event. You can try to use the onchange event. But feel the keyup the effect of the incident better.

2. Access back-end data via Ajax asynchronous method based on input content.

3. Traverse return data to add data to the display area.

4. Add some effect to each piece of data while adding the data, click on one of the data to fill in the text box, and the hint content disappears.

5. Background data should be spliced into JSON format.

The specific code is as follows:

<! DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 transitional//en" "Http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd
 ">  

JS text Box input Intelligent effect, for us to enter information to search very practical value, I hope this article for you to learn JavaScript programming help.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.