質問編集履歴
2
content-type => Content-Type
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('
|
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
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
|
-
|
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');
|