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

質問編集履歴

1

エディタの修正

2015/10/08 12:32

投稿

DaikiKojima
DaikiKojima

スコア11

title CHANGED
File without changes
body CHANGED
@@ -7,31 +7,31 @@
7
7
  //1.ミルクココアインスタンスを作成
8
8
  var milkcocoa = new MilkCocoa("id名");
9
9
 
10
- // $("#translate").on("click",function(){
10
+ $("#translate").on("click",function(){
11
- // $.ajax({
11
+ $.ajax({
12
- // type: "GET",
12
+ type: "GET",
13
- // url: "http://api.microsofttranslator.com/V2/Ajax.svc/Translate",
13
+ url: "http://api.microsofttranslator.com/V2/Ajax.svc/Translate",
14
- // dataType: "jsonp",
14
+ dataType: "jsonp",
15
- // data: {
15
+ data: {
16
- // client_id: 'id名',
16
+ client_id: 'dktky18',
17
- // client_secret:'顧客の秘密',
17
+ client_secret:'axe19HoGCPTtdu1R3ycOoiVU7ajQDZXLeR8W1iV2jbQ=',
18
- // scope: 'http://api.microsofttranslator.com',
18
+ scope: 'http://api.microsofttranslator.com',
19
- // grant_type: 'client_credentials',
19
+ grant_type: 'client_credentials',
20
- // text: "Hello, world!",
20
+ text: "Hello, world!",
21
- // from: "en",
21
+ from: "en",
22
- // to: "ja"
22
+ to: "ja"
23
- // },
23
+ },
24
- // jsonp: "oncomplete",
24
+ jsonp: "oncomplete",
25
- // //success: function (data, dataType) {
25
+ //success: function (data, dataType) {
26
- // // 結果を表示
27
- // success: function(response){
28
- // alert(response.status);
29
- // },
26
+ // 結果を表示
27
+ success: function(response){
28
+ alert(response.status);
29
+ },
30
- // error: function(response){
30
+ error: function(response){
31
- // alert(response.responseText);
31
+ alert(response.responseText);
32
+ }
32
- // }
33
+ //}
33
- // //}
34
- // });
34
+ });
35
35
 
36
36
 
37
37
  ```