回答編集履歴
1
chousei
test
CHANGED
@@ -6,15 +6,31 @@
|
|
6
6
|
|
7
7
|
```javascript
|
8
8
|
|
9
|
-
const
|
9
|
+
const calcFileUpdate = async (a,b,c)=>{
|
10
10
|
|
11
|
-
body
|
11
|
+
const body=new FormData();
|
12
12
|
|
13
|
-
body.append("
|
13
|
+
body.append("aaa",a);
|
14
14
|
|
15
|
+
body.append("bbb",b);
|
16
|
+
|
17
|
+
body.append("ccc",c);
|
18
|
+
|
15
|
-
fetch("sample.php",{method:"post",body}).then(res=>res.text())
|
19
|
+
return await fetch("sample.php",{method:"post",body}).then(res=>res.text());
|
20
|
+
|
21
|
+
};
|
22
|
+
|
23
|
+
(async()=>{
|
24
|
+
|
25
|
+
const res=await calcFileUpdate(1,2,3);
|
26
|
+
|
27
|
+
console.log(res);
|
28
|
+
|
29
|
+
})();
|
16
30
|
|
17
31
|
```
|
32
|
+
|
33
|
+
※調整版
|
18
34
|
|
19
35
|
//sample.php
|
20
36
|
|