In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-31 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly explains "what are the matters needing attention in jQuery.get". The content in the article is simple and clear, and it is easy to learn and understand. Please follow the editor's train of thought to study and learn what matters needing attention in jQuery.get.
Additional Notes: (other precautions:)
Due to browser security restrictions, most "Ajax" requirements follow a policy of the same origin; that is, data cannot be correctly received from different domains, subdomains, or protocols.
If a jQuery.get () request returns an error code, it quietly fails unless the script calls the global .ajaxError () method. In jQuery 1.5, the .error () method of the jqXHR object returned through jQuery.get () can also be used for error handling.
Requests in the form of Script and JSONP are not subject to the same origin policy.
Example:
Example: request the test.php page, but ignore the return result.
$.get ("test.php")
Example: request the test.php page and send the url parameter (although the returned result is still ignored).
Get ("test.php", {name: "John", time: "2pm"})
Example: passes an array of data parameters to the server (although the returned results are still ignored).
$.get ("test.php", {'choices []': ["Jon", "Susan"]})
Example: the result of the data requested by Alert from test.php (HTML or XML, depending on the result returned).
$.get ("test.php", function (data) {
Alert ("Data Loaded:" + data)
})
Example: Alert requests from test.cgi and sends the data result of the url parameter (HTML or XML, depending on the returned result).
$.get ("test.cgi", {name: "John", time: "2pm"}
Function (data) {
Alert ("Data Loaded:" + data)
})
Example: get the content in JSON format returned by the test.php page () and add it to the page.
$.get ("test.php"
Function (data) {
$('body') .append ("Name:" + data.name) / / John
.append ("Time:" + data.time); / / 2pm
}, "json")
Thank you for your reading, the above is the content of "what are the points for attention of jQuery.get". After the study of this article, I believe you have a deeper understanding of the matters needing attention of jQuery.get, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.