the included script tag executes when the DOM is inserted.
Script: Returns the plain text JavaScript code. Results are not automatically cached. Unless the cache parameter is set. Note that the remote request
(not in the same domain), all post requests are converted to get requests.
JSON: Returns JSON data.
JSONP:JSONP format. When you call a function using the Sonp form, for example, Myurl?callback=?,
The following small series will bring you a jQueryAjax instance code ($. ajax, $. post, $. get ). I think it is quite good. Now I will share it with you and give you a reference $. post, $. get is a simple method. To process complicated logic, you still need to use jQuery.
This article describes how to call Sina API to obtain short URLs. In this example, we will introduce how to use JQuery and Ajax. For more information, see
The Code is as follows:
Get Sina short URL
JSON (JavaScript Object notation) is a lightweight data interchange format. The Jsonm file contains information about name and value. Sometimes we need to read JSON-formatted data files, which can be implemented in jquery using Ajax or $.getjson () methods.
The following is used to read the JSON data format information in the Music.txt file using jquery.
First,
First look at the following code, and then give you a detailed description of Ajax in the ReadyState (status value) and status (status code) issues, the specific content as follows:
var getxmlhttprequest = function () {
tr
The code is as follows: I wrote a method to query the results, but the debug process found that the result set has data, how can I get through the variable?
JScript Code
Copy Code code as follows:
function Getchildnodearraybyparentid (categorycode) {
$.
This article mainly introduces the call Sina API to get a short URL of a lot of methods, this example for you to use jquery and Ajax to achieve, the need for friends can refer to the following nbsp; Code as follows: ;nbsp; nbsp; Code Download nbsp;
Look at an example of an AJAX query that submits a form with jquery.
Basic function: The user enters a form, enters the admission ticket and the verification code, verifies whether the user enters the form, clicks the query to submit, then obtains the return data from the server and displays.
The code is as follows:
The following is a detailed list of AJAX parameters in Jquery.:
Parameter Name
Type
Description
Url
String
(Default: Current page address) the address of the request sent.
Type
String
(Default: "GET") Request Method ("POST" or "GET"). The default value is "
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 (), $
Sharp jQuery Reading Notes --- Ajax in jQuery -- get, post, and other methods, jquery --- jquery
The load () method is usually used to obtain static data files from the Web server. However, this does not reflect the full value of
JQuery Ajax instances ($. ajax _ $. post _ $. get), jquery. ajax _
Jquery is well encapsulated in asynchronous submission, and it is very troublesome to directly use
$. Get (), $. post (), $. ajax (), $. getJSON () in Jquery, and jquery. post
This article describes $. get (), $. post (), $. ajax (), $. the usage of getJSON () is summarized in detail. For more information, see getJSON.
Details
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
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.