mirror of
https://gitee.com/many2many/java-web.git
synced 2025-01-11 22:50:54 +08:00
Compare commits
No commits in common. "309cd1125ca98724ef8734c1c3e504f9acfd1972" and "382617de81d6a9eab4c1d914d4ccc01c35c9ebaa" have entirely different histories.
309cd1125c
...
382617de81
@ -83,7 +83,6 @@ doSomethingAsync((result1) => {
|
|||||||
|
|
||||||
##### 3.3.1.2 Promise对象
|
##### 3.3.1.2 Promise对象
|
||||||
[Promise 10分钟,理论+实操](https://www.bilibili.com/video/BV1yu4y1H7ET/?spm_id_from=333.337.search-card.all.click&vd_source=fb252f6c305362a2870fb7388465df99)
|
[Promise 10分钟,理论+实操](https://www.bilibili.com/video/BV1yu4y1H7ET/?spm_id_from=333.337.search-card.all.click&vd_source=fb252f6c305362a2870fb7388465df99)
|
||||||
|
|
||||||
[最好理解的Promise教程](https://www.bilibili.com/video/BV1454y1R7vj?p=1)
|
[最好理解的Promise教程](https://www.bilibili.com/video/BV1454y1R7vj?p=1)
|
||||||
|
|
||||||
[异步编程: 一次性搞懂 Promise, async, await (#js #javascript)](https://www.bilibili.com/video/BV1WP4y187Tu/?spm_id_from=333.337.search-card.all.click&vd_source=fb252f6c305362a2870fb7388465df99)
|
[异步编程: 一次性搞懂 Promise, async, await (#js #javascript)](https://www.bilibili.com/video/BV1WP4y187Tu/?spm_id_from=333.337.search-card.all.click&vd_source=fb252f6c305362a2870fb7388465df99)
|
||||||
@ -318,8 +317,8 @@ async function example() {
|
|||||||
console.log('Data received:', data);
|
console.log('Data received:', data);
|
||||||
console.log('Text Status:', textStatus);
|
console.log('Text Status:', textStatus);
|
||||||
console.log('jqXHR:', jqXHR);
|
console.log('jqXHR:', jqXHR);
|
||||||
$("#title").html(data.title);
|
document.getElementById("title").innerHTML = data.title;
|
||||||
$("#content").html(data.body);
|
document.getElementById("content").innerHTML = data.body;
|
||||||
}).fail(function(jqXHR, textStatus, errorThrown) {
|
}).fail(function(jqXHR, textStatus, errorThrown) {
|
||||||
console.error('Request failed:', textStatus, errorThrown);
|
console.error('Request failed:', textStatus, errorThrown);
|
||||||
});
|
});
|
||||||
@ -332,8 +331,8 @@ async function example() {
|
|||||||
console.log('Data received:', data);
|
console.log('Data received:', data);
|
||||||
console.log('Text Status:', textStatus);
|
console.log('Text Status:', textStatus);
|
||||||
console.log('jqXHR:', jqXHR);
|
console.log('jqXHR:', jqXHR);
|
||||||
$("#title2").html(data.title);
|
document.getElementById("title2").innerHTML = data.title;
|
||||||
$("#content2").html(data.body);
|
document.getElementById("content2").innerHTML = data.body;
|
||||||
},
|
},
|
||||||
error: function(jqXHR, textStatus, errorThrown) {
|
error: function(jqXHR, textStatus, errorThrown) {
|
||||||
console.error('Request failed:', textStatus, errorThrown);
|
console.error('Request failed:', textStatus, errorThrown);
|
||||||
|
@ -23,8 +23,8 @@
|
|||||||
console.log('Data received:', data);
|
console.log('Data received:', data);
|
||||||
console.log('Text Status:', textStatus);
|
console.log('Text Status:', textStatus);
|
||||||
console.log('jqXHR:', jqXHR);
|
console.log('jqXHR:', jqXHR);
|
||||||
$("#title").html(data.title);
|
document.getElementById("title").innerHTML = data.title;
|
||||||
$("#content").html(data.body);
|
document.getElementById("content").innerHTML = data.body;
|
||||||
}).fail(function(jqXHR, textStatus, errorThrown) {
|
}).fail(function(jqXHR, textStatus, errorThrown) {
|
||||||
console.error('Request failed:', textStatus, errorThrown);
|
console.error('Request failed:', textStatus, errorThrown);
|
||||||
});
|
});
|
||||||
@ -37,8 +37,8 @@
|
|||||||
console.log('Data received:', data);
|
console.log('Data received:', data);
|
||||||
console.log('Text Status:', textStatus);
|
console.log('Text Status:', textStatus);
|
||||||
console.log('jqXHR:', jqXHR);
|
console.log('jqXHR:', jqXHR);
|
||||||
$("#title2").html(data.title);
|
document.getElementById("title2").innerHTML = data.title;
|
||||||
$("#content2").html(data.body);
|
document.getElementById("content2").innerHTML = data.body;
|
||||||
},
|
},
|
||||||
error: function(jqXHR, textStatus, errorThrown) {
|
error: function(jqXHR, textStatus, errorThrown) {
|
||||||
console.error('Request failed:', textStatus, errorThrown);
|
console.error('Request failed:', textStatus, errorThrown);
|
||||||
|
Loading…
Reference in New Issue
Block a user