質問するログイン新規登録

質問編集履歴

2

content-type => Content-Type

2020/05/04 10:07

投稿

YUTO_IT
YUTO_IT

スコア20

title CHANGED
File without changes
body CHANGED
@@ -18,7 +18,7 @@
18
18
  function action(){
19
19
  var xhr = new XMLHttpRequest();
20
20
  xhr.open('POST', 'http://localhost:8080');
21
- xhr.setRequestHeader('content-type', 'text/plain;charset=UTF-8');
21
+ xhr.setRequestHeader('Content-Type', 'text/plain;charset=UTF-8');
22
22
  var text = "こんにちは";
23
23
  xhr.onreadystatechange = function() {
24
24
  if(xhr.readyState === 4 && xhr.status === 200) {

1

Function => function

2020/05/04 10:07

投稿

YUTO_IT
YUTO_IT

スコア20

title CHANGED
File without changes
body CHANGED
@@ -15,7 +15,7 @@
15
15
  <input type="button" name="実行" value="実行" onClick='action();'/>
16
16
 
17
17
  **[Javascript]**
18
- Function action(){
18
+ function action(){
19
19
  var xhr = new XMLHttpRequest();
20
20
  xhr.open('POST', 'http://localhost:8080');
21
21
  xhr.setRequestHeader('content-type', 'text/plain;charset=UTF-8');