In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
Today, the editor will share with you the relevant knowledge points about how to deal with the actual transmission of Ajax data. The content is detailed and the logic is clear. I believe most people still know too much about this knowledge, so share this article for your reference. I hope you can get something after reading this article.
JQuery.ajaxTransport (dataType, handler (options, originalOptions, jqXHR))
Description: create an object that handles the actual transfer of Ajax data.
DataType
Type: String
A string that identifies the data type used
Handler (options, originalOptions, jqXHR)
Type: Function ()
A handler that returns a new transport object using the data type provided in the first parameter.
Transport is an object that provides two methods, send and abort, which are internally used to make requests by $.ajax (). Transport is the most advanced method to enhance $. Ajax () and should only be used as a last resort when pre-filters (prefilters) and converters (converters) cannot meet your needs.
Since each request needs its own instance of a transport object, the transport cannot be registered directly. Therefore, you should provide a function instead of return transfer (transport).
The transports factory registration uses $.ajaxTransport (). A typical registration looks like this:
$.ajaxTransport (function (options, originalOptions, jqXHR) {
If (/ * transportCanHandleRequest * /) {
Return {
Send: function (headers, completeCallback) {
/ * send code * /
}
Abort: function () {
/ * abort code * /
}
}
}
})
These are all the contents of the article "how to handle the actual transmission of Ajax data". Thank you for reading! I believe you will gain a lot after reading this article. The editor will update different knowledge for you every day. If you want to learn more knowledge, please pay attention to the industry information channel.
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.