In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-02 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/03 Report--
What this article shares with you is about the effect of ajax Suggest search tips similar to google. The editor thinks it is very practical, so I share it with you to learn. I hope you can get something after reading this article. Without saying much, let's take a look at it.
Achieve:
_ window.onload = initializeSuggestFramework
With the above two sentences, each named text box has five more attributes:
1.action must. Accepts the data submitted in GET and returns the dynamic page of the relevant Javascript array.
If 2.capture returns more than one column of results (such as the word and Chinese meaning in this example), the column entered by the user will be replaced (starting at 1). Usually this corresponds to the database field.
Optional, default is 1.
The number of columns displayed in the 3.columns drop-down, such as in this case, the words are queried alphabetically and the Chinese meaning is displayed on the right. Optional, default is 1.
4.delay query latency in milliseconds. Lower latency results in a faster response, but increases the burden on the server. Optional, default is 1000 (1 second).
If 5.heading is set to true, the first array value is used as a non-selectable item (title block). It is useful when you have two or more columns of data. Optional, default is false.
Data submission requires only two pieces of data
Name of the 1.type input box
2.Q search keywords (default UTF-8 encoding)
The compressed package you downloaded already contains examples of php and ColdFusion, but of course this framework can be applied to all programming languages without platform restrictions. The background data output is a Javascript statement. The one-dimensional array reads as follows:
New Array ("val1", "val2", "val3")
The two-dimensional array reads as follows:
New Array (
New Array ("row 1, column 1", "row 1, column 2")
New Array ("line 2, column 1", "line 1, column 2")
New Array ("line 3, column 1", "line 1, column 2")
);
Finally, there are four classes that need to be defined in css
.SuggestFramework _ List prompt content area
.SuggestFramework _ Heading the first prompt
.SuggestFramework _ Highlighted set a highlight prompt
.SuggestFramework _ Normal other hints
Download address http://xiazai.jb51.net/200903/yuanma/SuggestFramework-0.31.zip
The above is what the effect of ajax Suggest search tips similar to google is, and the editor believes that there are some knowledge points that we may see or use in our daily work. I hope you can learn more from this article. For more details, please follow the industry information channel.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 221
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.