Home >Web Front-end >JS Tutorial >jquery study notes 1_jquery

jquery study notes 1_jquery

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-05-16 18:30:081166browse

jquery basic information

jquery’s official website: www.jquery.com

jquery explanation: jquery is a javascript class library that provides a large number of javascript class libraries and APIs to facilitate javascript development.

jquery API Chinese reference manual: http://jquery-api-zh-cn.googlecode.com/svn/trunk/index.html

Submit front-end data to back-end demo:

Example picture:

 jquery study notes 1_jquery jquery study notes 1_jquery

Function points:

1. Use $("#UserName") to get the jquery object with the id UserName.

2. Use jquery’s get, ajax, and load methods to submit data to the background.

 3. Use jquery’s removeClass and addClass methods to modify the style.

 4.encodeURI(username) transcodes the string to prevent garbled characters in Chinese. Note that System.Web.HttpUtility.UrlDecode(str,encoding) must be used in the background to decode

Front-end html:

Copy code The code is as follows:












Please enter the name:












< ;/div>




Server-side code:
Copy code The code is as follows:

protected void Page_Load(object sender, EventArgs e)
{
if (HttpContext.Current.Request.QueryString["m"] != null)
{
//Pass the requested data GB2312 decoding
string method = System.Web.HttpUtility.UrlDecode(HttpContext.Current.Request.QueryString["m"], Encoding.GetEncoding("GB2312"));//

HttpContext.Current .Response.Write(method "Has been verified!");

Response.End();
}
}
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