How to realize the blog search function without Refresh by AJAX
This article mainly explains "AJAX how to achieve blog non-refresh search function", the content of the article is simple and clear, easy to learn and understand, the following please follow the editor's ideas slowly in depth, together to study and learn "AJAX how to achieve blog non-refresh search function" bar!
Search results template sample.xml
The code is as follows:
one
On the first experience of AJAX
Each result is a search result, and to deal with situations where no relevant content is found, I define a logid of # when the search result is empty.
After completing the XML document template, you can use ASP to dynamically generate the XML documents needed for the search results. The keywords of the search are passed by POST.
Search results output ajaxsearch.asp
The code is as follows: