回答編集履歴
2
ちょうせい
test
CHANGED
@@ -8,7 +8,7 @@
|
|
8
8
|
|
9
9
|
window.addEventListener('DOMContentLoaded', ()=>{
|
10
10
|
|
11
|
-
document.querySelector('#
|
11
|
+
document.querySelector('#part').addEventListener('change',e=>{
|
12
12
|
|
13
13
|
const event=document.querySelector('#event');
|
14
14
|
|
@@ -16,7 +16,13 @@
|
|
16
16
|
|
17
17
|
if(e.target.value!==""){
|
18
18
|
|
19
|
+
var params=new URLSearchParams();
|
20
|
+
|
21
|
+
params.append('part',e.target.value);
|
22
|
+
|
23
|
+
const url="・・・?"+params.toString();
|
24
|
+
|
19
|
-
fetch(
|
25
|
+
fetch(url).then(res=>res.json()).then(data=>{
|
20
26
|
|
21
27
|
data.forEach(x=>{
|
22
28
|
|
@@ -38,7 +44,7 @@
|
|
38
44
|
|
39
45
|
<div>部位</div>
|
40
46
|
|
41
|
-
<select id="
|
47
|
+
<select id="part">
|
42
48
|
|
43
49
|
<option value="">---</option>
|
44
50
|
|
1
chousei
test
CHANGED
@@ -10,13 +10,13 @@
|
|
10
10
|
|
11
11
|
document.querySelector('#s1').addEventListener('change',e=>{
|
12
12
|
|
13
|
+
const event=document.querySelector('#event');
|
14
|
+
|
15
|
+
event.innerHTML="";
|
16
|
+
|
13
17
|
if(e.target.value!==""){
|
14
18
|
|
15
19
|
fetch('y.php').then(res=>res.json()).then(data=>{
|
16
|
-
|
17
|
-
const event=document.querySelector('#event');
|
18
|
-
|
19
|
-
event.innerHTML="";
|
20
20
|
|
21
21
|
data.forEach(x=>{
|
22
22
|
|