質問編集履歴

1

余計な部分を省いて質問をわかりやすくしました。

2020/08/04 18:56

投稿

tomtomtomtom
tomtomtomtom

スコア563

test CHANGED
File without changes
test CHANGED
@@ -180,12 +180,6 @@
180
180
 
181
181
  let xhr=new XMLHttpRequest();
182
182
 
183
- let response=xhr.responseText;
184
-
185
- xhr.onload=function(){if(response.length>0){alert(response);}}
186
-
187
- xhr.onerror=function(){alert('error');}
188
-
189
183
  xhr.open(method,`${url}.json`);
190
184
 
191
185
  xhr.setRequestHeader('Content-Type', 'application/json');