Showing
1 changed file
with
8 additions
and
5 deletions
... | @@ -2,17 +2,20 @@ | ... | @@ -2,17 +2,20 @@ |
2 | <html> | 2 | <html> |
3 | 3 | ||
4 | <body> | 4 | <body> |
5 | - <article> | ||
6 | - | ||
7 | - </article> | ||
8 | <input type="button" value="fetch" onclick=" | 5 | <input type="button" value="fetch" onclick=" |
9 | - /*fetch('css').then(function(response){ | 6 | + /* |
7 | + fetch('css').then(function(response){ | ||
10 | response.text().then(function(text){ | 8 | response.text().then(function(text){ |
11 | alert(text); | 9 | alert(text); |
12 | }) | 10 | }) |
13 | }) | 11 | }) |
14 | */ | 12 | */ |
15 | - fetch('html'); | 13 | + function callbackme(){ |
14 | + console.log('response end'); | ||
15 | + } | ||
16 | + fetch('html').then(callbackme); // | ||
17 | + console.log(1); | ||
18 | + console.log(2); | ||
16 | "> | 19 | "> |
17 | </body> | 20 | </body> |
18 | </html> | 21 | </html> | ... | ... |
-
Please register or login to post a comment