回答編集履歴
4
ついき
test
CHANGED
@@ -36,8 +36,18 @@
|
|
36
36
|
|
37
37
|
</form>
|
38
38
|
|
39
|
+
```
|
39
40
|
|
40
41
|
|
41
42
|
|
43
|
+
- send.php
|
44
|
+
|
45
|
+
```PHP
|
46
|
+
|
47
|
+
<?PHP
|
48
|
+
|
49
|
+
print_r($_POST);
|
50
|
+
|
51
|
+
?>
|
42
52
|
|
43
53
|
```
|
3
調整
test
CHANGED
@@ -14,7 +14,7 @@
|
|
14
14
|
|
15
15
|
const method = "POST";
|
16
16
|
|
17
|
-
const body = new FormData(
|
17
|
+
const body = new FormData(e.target.form);
|
18
18
|
|
19
19
|
fetch('send.php', {method, body}).then(data=>data.text()).then(console.log)
|
20
20
|
|
@@ -24,7 +24,7 @@
|
|
24
24
|
|
25
25
|
</script>
|
26
26
|
|
27
|
-
<form method="post" action="send.php"
|
27
|
+
<form method="post" action="send.php">
|
28
28
|
|
29
29
|
<input type="text" name="res[]" value="a"><br>
|
30
30
|
|
2
調整
test
CHANGED
@@ -24,7 +24,7 @@
|
|
24
24
|
|
25
25
|
</script>
|
26
26
|
|
27
|
-
<form method="post" action="
|
27
|
+
<form method="post" action="send.php" id="f1">
|
28
28
|
|
29
29
|
<input type="text" name="res[]" value="a"><br>
|
30
30
|
|
1
chousei
test
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
|
7
7
|
<script>
|
8
8
|
|
9
|
-
window.addEventListener('DOMContentLoaded',
|
9
|
+
window.addEventListener('DOMContentLoaded', ()=>{
|
10
10
|
|
11
11
|
document.querySelector('#sbm').addEventListener('click',e=>{
|
12
12
|
|