Home > Article > Web Front-end > js code that imitates Baidu input box smart prompt_javascript skills
Customer demands have been changing recently, but some of them were due to urgent requests from customers, so I couldn’t finish it quickly, so I made a prototype for them first, and then slowly modified it later. For example, I made a drop-down list for them in the prototype. In fact, they have more than 200 pieces of data. It is unrealistic to use a drop-down list. How can you find so much? And how long should that drop-down list be? So naturally, I thought of Baidu’s smart prompt function.
I referred to what I forgot to write before. He used Baidu API. For the sake of simplicity, I put all the data in js, so that it would be easier for readers to understand.
Let’s pass the entire code, it’s not long. Before I took the test, I forgot which hero wrote it. He used Baidu API. For the sake of simplicity, I set all the data in js, so that it would be easier for the readers to understand.