質問編集履歴
1
エディタの修正
test
CHANGED
File without changes
|
test
CHANGED
@@ -16,55 +16,55 @@
|
|
16
16
|
|
17
17
|
|
18
18
|
|
19
|
-
|
19
|
+
$("#translate").on("click",function(){
|
20
20
|
|
21
|
-
|
21
|
+
$.ajax({
|
22
22
|
|
23
|
-
|
23
|
+
type: "GET",
|
24
24
|
|
25
|
-
|
25
|
+
url: "http://api.microsofttranslator.com/V2/Ajax.svc/Translate",
|
26
26
|
|
27
|
-
|
27
|
+
dataType: "jsonp",
|
28
28
|
|
29
|
-
|
29
|
+
data: {
|
30
30
|
|
31
|
-
|
31
|
+
client_id: 'dktky18',
|
32
32
|
|
33
|
-
|
33
|
+
client_secret:'axe19HoGCPTtdu1R3ycOoiVU7ajQDZXLeR8W1iV2jbQ=',
|
34
34
|
|
35
|
-
|
35
|
+
scope: 'http://api.microsofttranslator.com',
|
36
36
|
|
37
|
-
|
37
|
+
grant_type: 'client_credentials',
|
38
38
|
|
39
|
-
|
39
|
+
text: "Hello, world!",
|
40
40
|
|
41
|
-
|
41
|
+
from: "en",
|
42
42
|
|
43
|
-
|
43
|
+
to: "ja"
|
44
44
|
|
45
|
-
|
45
|
+
},
|
46
46
|
|
47
|
-
|
47
|
+
jsonp: "oncomplete",
|
48
48
|
|
49
|
-
//
|
49
|
+
//success: function (data, dataType) {
|
50
50
|
|
51
|
-
|
51
|
+
// 結果を表示
|
52
52
|
|
53
|
-
|
53
|
+
success: function(response){
|
54
54
|
|
55
|
-
|
55
|
+
alert(response.status);
|
56
56
|
|
57
|
-
|
57
|
+
},
|
58
58
|
|
59
|
-
|
59
|
+
error: function(response){
|
60
60
|
|
61
|
-
|
61
|
+
alert(response.responseText);
|
62
62
|
|
63
|
-
|
63
|
+
}
|
64
64
|
|
65
|
-
//
|
65
|
+
//}
|
66
66
|
|
67
|
-
|
67
|
+
});
|
68
68
|
|
69
69
|
|
70
70
|
|