Home  >  Article  >  Web Front-end  >  Word search implementation based on jquery (memo)_jquery

Word search implementation based on jquery (memo)_jquery

WBOY
WBOYOriginal
2016-05-16 18:19:451114browse

Reference page: http://www.jb51.net/article/24825.htm

1. DragSearchByJQuery.aspx page (calling page)

Copy code The code is as follows:










"A Dream of Red Mansions" is one of the four great classics in ancient my country. It is a chapter novel and was written in 1784 (the 49th year of Emperor Qianlong of the Qing Dynasty). The preface to the master of Mengjue is officially titled "A Dream of Red Mansions", and its original names were "The Story of the Stone", "The Record of the Love Monk", "The Mirror of the Wind and the Moon", "The Twelve Hairpins of Jinling", etc. It is the greatest novel in ancient my country and one of the classics of world literature. Author Cao Xueqin. The current popular sequel is the 120-chapter "A Dream of Red Mansions" completed by Gao E.



if you want to search,one way is to Google,one of the others is Baidu







Related JQuery
Copy code The code is as follows:




二、Search.aspx页面(被调用页面)
复制代码 代码如下:









后台
复制代码 代码如下:

protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
this.txtContent.Text = Request.QueryString["q"].ToString();
btnSearch_Click(sender, e);
}
}
protected void btnSearch_Click(object sender, EventArgs e)
{
this.lblNote.Text = "搜索关键字为:" this.txtContent.Text;
}

3. Notes
1. Reasons for using encodeURIComponent instead of escape
Escape() only converts ASCII characters into codes like %unnnn. If you want to use more For many characters such as UTF-8 character library, you must use encodeURIComponent() or encodeURI() to convert it into %nn%nn. Only this code can be escaped(). It only converts ASCII characters into %unnnn like this. code, if you want to use more characters such as the UTF-8 character library, you must use encodeURIComponent() or encodeURI() to convert it into %nn%nn. This code can be used.
Source: Please see http://www.misuisui.com/weblog/?p=418

2. There is an article on the Internet that is implemented using Javascript. The specific code is:
Copy code The code is as follows:

<%@ Page Language="C#" AutoEventWireup="true" Codebehind=" DragSearch.aspx.cs" Inherits="CanYou.AutoComplete.Web.DragSearch" %>



Word search



One of the great masterpieces, it is a chapter novel and was written in 1784 (the 49th year of Emperor Qianlong of the Qing Dynasty). The preface to the master of Mengjue is officially titled "A Dream of Red Mansions", and its original names were "The Story of the Stone", "The Record of the Love Monk", "The Mirror of the Wind and the Moon", "The Twelve Hairpins of Jinling", etc. It is the greatest novel in ancient my country and one of the classics of world literature. Author Cao Xueqin. The current popular sequel is the 120-chapter "A Dream of Red Mansions" completed by Gao E.



if you want to search,one way is to Google,one of the others is Baidu







< ;script type="text/javascript" language="javascript">




(Reference URL: http://www.jb51.net/article/ 20610.htm)
However, compared to the above implementation using JQuery, the problem with this solution is that for searches that contain multiple English words, only a part of them is used for word search. It needs further improvement.
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn