Javascript text box input content smart tip effect _ javascript skills

Source: Internet
Author: User
This article mainly introduces the smart tip Effect of js text box input content, which is very simple and practical. If you need it, you can refer to the example in this article to describe the smart prompt effect code of js text box input content. Share it with you for your reference. The details are as follows:
The running effect is as follows:

General idea:

1. Listen to text box events. The keyup event is used here. You can try the onchange event. However, the effect of the keyup event is better.

2. Access background data asynchronously based on the input content through ajax.

3. traverse the returned data and add the data to the display area.

4. Add some effects to each piece of data while adding the data. Click one of them to fill in the data in the text box, and the prompt will disappear.

5. The background data should be spliced into json format.

The Code is as follows:

 Automatic prompt 
Related Article

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.