use ajax to trigger multiple ajax requests at the same time
for example, if there are 10 get requests, I want them to trigger at the same time and request at the same time.
use ajax to trigger multiple ajax requests at the same time
for example, if there are 10 get requests, I want them to trigger at the same time and request at the same time.
copy 10 directly, or write a loop
var result1;
var result2;
$.when(
$.ajax({ // First Request
url: form_url,
type: form_method,
data: form_data,
cache: false,
success: function(returnhtml){
result1 = returnhtml;
}
}),
$.ajax({ //Seconds Request
url: form_url,
type: form_method,
data: form_data,
cache: false,
success: function(returnhtml){
result2 = returnhtml;
}
})
).then(function() {
$('-sharpresult1').html(result1);
$('-sharpresult2').html(result2);
});
write 10 in order
write a parameter passing method and call it 10 times
requirements: after the data is successfully loaded through ajax, what if the user refreshes the page and caches the requested data? Instead of requesting back-end data again. Compatible with IE8 and above ...
getInfo(){ var that = this let obj = { banner: axios.get(that.url + home.php?Action=banner&setaction=banner ), logo: axios.get(that.url + home.php?Action=advertising&setaction=logo ), code: axios.get(th...
in Google browser, open the written local html, this html has a $.ajax request, and the requested url is a distant server. Before, you can initiate ajax requests, but it will not occur as shown in the following figure: I have tried-- allow-file-access...
<?foreach ($region_get_all->regions as $key):?> <?endforeach;?> suppose I get multiple numbers via foreach what I want to do is that when the user selects the "edit " data , I will show the div that there will be data , and wil...
< H2 > how did the printed index max item come from < H2 >? ...
wx.request({ url: dataUrl, method: PATCH , data: { "isRead": true }, header: app.globalData.headerCommon, success: function (res) { if (res.data.code === 200) { typeof callback == function ...
problem: the latest template-web.js, downloaded using webpack cannot be used when using ajax in jquery3.3.1.js Code: used: modified version of jquery: 1.11.1, 2.4.1 and other versions also reported errors ...
jQueryajax JSON function ajax(obj){ var temp={ type: get , url:"-sharp", data:{}, success:function(param){console.log(param)} }; for(var key in obj){ temp[key]=obj[key]; } var dat...
now there is such a requirement, for example, I have an array: arr=[ { id: 84001 , name: },{ id: 84002 , name: },{ ...
$.ajax({ data:{ delayNum:$("-sharpajax-one").val(), }, url: " test one.do?callback?", calback:"jsonp"+new Date().getTime(), type:"post", callback:"...
the button dynamically generated by JQuery disappears a little bit. Does any boss know why? <div class="col-sm-4"> <button type="button" class="btn btn-md btn-link" id="data_con_Add">< butto...
how should Ajax be used in LayUI data tables? does not use a MVC structure. would like to be more detailed, the newcomer uses Ajax for the first time. personal understanding: Json returns after passing a value in the form of: data post to url dat...
how many Synchronize requests can be triggered by the ajax of query? ...
Under https, if POST requests to report to illegal request; http, it will be normal. ...
problem website http: www.xingk.cc forum.php. needs to be registered, which is quite troublesome. Here is a temporary account account: Av123456! password for Alain Lei who likes to play with shit. problem description the address of the networ...
$(function() { $( -sharpremove_favorite_btn ).click(function (e){ e.preventDefault(); $.ajax({ type: "GET", url: , success: function(data){ $( -sharpremove_favorite_btn ).attr( id , add_favorite_b...
post export function post (url, data) { let token = 111 return new Promise(function (resolve, reject) { axios(url, { method: post , headers: { Content-Type : application json , Authori...
will browsers cache if ajax sets cache to false, and will browser caches be solved by adding a timestamp if they don t know how to cache? What is the purpose of ajax setting the global property? ...
Error: Network Error at createError (eval at <anonymous> (bundle.js:1759), <anonymous>:16:15) at XMLHttpRequest.handleError (eval at <anonymous> (bundle.js:1741), <anonymous>:87:14) print err in interceptor is the above, witho...
problem description I want to write AJAX, on the page and pass the value in an input to the action, in controller and take out the call. Please give me some advice . the environmental background of the problems and what methods you have tried relat...