This article introduces the js Code similar to the smart prompts In the Baidu input box. If you need it, you can refer to the recent changes to customer requirements. However, some of them are due to the customer's rush and I am not so quick to complete them, so I made a prototype for them first, and then slowly changed it. For example, I made a drop-down list for them in the prototype. In fact, there are more than 200 data records. It is unrealistic to use a drop-down list. Can you find so many data entries? And how long should the drop-down list be? So naturally, I think of the smart prompt function of Baidu.
Let's take a look at some things that I forgot about. He uses Baidu api. For simplicity, I set all the data to js, in this way, officers are easy to understand.
Let's test the entire Code. The Code is not long. After taking a test, I forgot which man wrote something. He used Baidu api. For the sake of simplicity, I set the data to js, in this way, officers are easy to understand.
The Code is as follows: