I. Summary
This series of articles will take you into the wonderful world of jquery, with many authors ' specific experiences and solutions, even if you can use jquery to find some cheats in your reading.
This article explains how to use jquery to quickly and easily implement AJAX functionality. Unify the way that al
Basic Jquery tutorial
Author: Rebecca Murphey
Original link address http://jqfundamentals.com/
With contributions by James Padolsey, Paul Irish, and others. See the GitHub repository for a complete history of contributions.
Copyright 2011
Jquery Ajax
I. Overview
The XMLHttpRequest method allows the browser to communicate with the server without the need to reloa
This article mainly introduces how to use Ajax. There is also an explanation of how Ajax in jquery is. Now let's take a look at this article.
The Ajax method parameters in jquery have the following meanings:1.url:Requires that the requested address be sent as a parameter of
= "Wkiom1ccpmdxnf0baabo2stj8la607.png"/>Serialization of Forms-Serialization: Converting an object's state to a format that can be persisted or transferred-form serialization: Convert form elements to a committed string or JSON string-Data storage and transfer can be easily achieved by serialization-in jquery, form elements can be serialized into ordinary strings through the serialize () method, and the form elements are serialized into JSON strings t
automatically cached. Unless the cache parameter is set. Note in the remote request(not under the same domain), all post requests are converted to get requests.JSON: Returns the JSON data.JSONP:JSONP format. When a function is called using the Sonp form, for example Myurl?callback=?,jquery will automatically replace the latter“?” is the correct function name to execute the callback function.Text: Returns a plain text string.Beforesend: A function tha
Serialize () Method:Acts on a jquery object, which serializes the contents of the DOM elements into strings for Ajax requests.DOCTYPE HTML>HTML>HeadLang= "en"> MetaCharSet= "UTF-8"> Scripttype= "Text/javascript"src=".. /.. /js/jquery-2.1.3.js ">Script> style> * {margin:0;padding:0;}Body{font-size:12px;}. Comment{Margin-top:10px;padding:10px;Border
Jquery-ajax-cacheSource Address: Https://github.com/WQTeam/jquery-ajax-cachejquery Plugins-caching jquery AJAX requests with ' localstorage ' and ' sessionstorage '.Let's start by explaining what scenario you need to use to cache
This article is for jquery in $.get (), $.post (), $.ajax (), $.getjson () with a detailed summary of the introduction, the need for friends can come over to the reference, I hope to be helpful to everyoneRead more about jquery's various Ajax functions:$.get (), $.post (), $.ajax (), $.getjson ()A, $.get (Url,[data],[c
Summary of common methods for jQuery to call ajax requests, and summary of jquery to call ajax
This example summarizes the common methods for jQuery to call ajax requests. Share it with you for your reference. The details are as f
The solution to the problem of page flickering caused by asynchronous requests based on JQuery's $. ajax method is jquery. ajax.
Scenario
Currently, you need to fill in the content in the text box to automatically trigger the keyup event. The drop-down list will automatically filter the corresponding options, but $ is used. After
data format is of JSON type);
Three, $.ajax (Opiton)
Description: $.ajax () This function is powerful, you can do a lot of precise control of Ajax, you need to specify the relevant information to refer to$.ajax ({url: "ajax/ajax_selectpictype.aspx", Data:{full: "Fu"},type
',
6 success:
CallBack,
7 Error:
function
(er) { C11>8
backerr (er);}
9 });
Thu, $.getjson (Url,[data],[callback])Description: The $.getjson (Url,[data],[callback]) function does not have a type parameter, the JSON type is returned, and no conversion is required.1 $.getjson ("Dep.do?p=getalldep", {x:math.random ()},function(arry) {2 for (var i=0;i) {3 varnew Option (arry[i].deptname,arry[i). DeptID); 4 document.getEl
',6success:callback,7 Error:function(er) {8backerr (er);} 9 }); Thu, $.getjson (Url,[data],[callback])Description: The $.getjson (Url,[data],[callback]) function does not have a type parameter, the JSON type is returned, and no conversion is required.1 $.getjson ("Dep.do?p=getalldep", {x:math.random ()},function(arry) {2 for (var i=0;i) {3 var New Option (arry[i].deptname,arry[i].deptid); 4 document.getElementById ("DEP"). Options.add (OP); 5
Suppose there is a based on. NET Web Service with the name Saveproductpost/productservice.asmx http/1.1host:localhostcontent-type:text/xml; Charset=utf-8content-length: Lengthsoapaction: "Http://sh.inobido.com/SaveProduct"XML version= "1.0" encoding= "Utf-8"?>Soap:envelopeXmlns:xsi= "Http://www.w3.org/2001/XMLSchema-instance"xmlns:xsd= "Http://www.w3.org/2001/XMLSchema"Xmlns:soap= "http://schemas.xmlsoap.org/soap/envelope/"> Soap:body> saveproductxmlns= "http://sh.inobido.com/">
Although the newer API for jquery is already very useful, but in the actual work or have to do two times the need for encapsulation, the benefits are: 1, two times after the encapsulation of the API more concise, more in line with the use of personal habits; 2, you can do some unified processing of AJAX operations, such as appending random numbers or other parameters. At the same time at work, we will find
Click the link to join the group "Java EE (ssh+intellijide+maven)": http://jq.qq.com/?_wv=1027k=L2rbHv $.ajax ({url: "Address to access", async:false,//nesting when it is better to add this, otherwise prone to problems, My is here is a problem, the outer layer should not matter, the inside must add data: "parameter name = parameter value", success:function (msg) { $.ajax ({ url: "Address to visit", async:
not need to be converted.
1 $.getJSON("dep.do?p=getAllDep",{x:Math.random()},function(arry){2 for(var i=0;i
Other functions of jquery:
Load Static pages
Load (URL, [data], [callback]);URL (string) URL of the requested HTML pageData (MAP) (optional parameter) Key/value data sent to the serverCallback (callback) (optional) callback function when the request is completed (success is not required)
The load () method can easily Load Static pa
Directory (updated articles will be connected, and an article will be updated every two to three days starting from March 13, July 25 ):
ASP. NET + jquery. Ajax details 1-opening section (published on February 25)
ASP. NET + jquery. Ajax details 2-$. Load (published on 2012.07.26)
ASP. NET +
i=0;iSome of the other functions of jquery:Loading static pagesLoad (URL, [data], [callback]);URL address of the URL (String) of the requested HTML pageData (MAP) (optional parameters) sent to the server Key/valueCallback (callback) (optional parameter) callback function when the request is complete (does not need to be success)The load () method can easily load static page content into a specified jquery object.$ (' #
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.