Home > front end >  JS ajax, after each request message
JS ajax, after each request message

Time:11-17

Recursive request ajax, want after each request message, but it will only hint at the completion of a method to perform and does not prompt after each ajax request

Should be rendered, a alert to ajax hints at a time, now want to ask how to solve this can let each request message is displayed

The function KHF (I, num) {

If (i> Num) {

$(' # showinfo). The HTML (" & lt; H4 style="color: red; '& gt; Card is successful, the total fabrication "+ overnum +" zhang & lt;/h4 & gt;" );
return;
}

$. Ajax ({
Url: 'cardMake/make. Do,
Type: "POST",
Data: $(' # form.) serialize (),
DataType: "json",
Async: false,
Success: the function (data) {
$(' # showinfo). The HTML (" & lt; H4 style="color: red; '& gt; Card is successful, have card "+ I +" zhang & lt;/h4 & gt;" );
The console. The log (" new card write card success: card number - "+ RTKH);
}
})
KHF (I + 1, num);
}

  • Related