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

質問編集履歴

2

二重セミコロンの解除

2019/12/14 17:23

投稿

slimat
slimat

スコア57

title CHANGED
File without changes
body CHANGED
@@ -86,7 +86,7 @@
86
86
  function nextQuestion() {
87
87
  countObj.countPlus();
88
88
  try {
89
- google.script.run.withSuccessHandler(setQuestion).withFailureHandler(failedAccess).withUserObject(countObj.count, 'QAInfo').QAInfo(countObj.count);;
89
+ google.script.run.withSuccessHandler(setQuestion).withFailureHandler(failedAccess).withUserObject(countObj.count, 'QAInfo').QAInfo(countObj.count);
90
90
  } catch (e) {
91
91
  document.getElementById("Button4").insertAdjacentHTML('afterend','<p>error → hello.html → 問題文など取得時 → ' + e.message + '</p>');
92
92
  }

1

情報の追記

2019/12/14 17:23

投稿

slimat
slimat

スコア57

title CHANGED
File without changes
body CHANGED
@@ -1,8 +1,8 @@
1
1
  こんにちは
2
2
 
3
3
  GASでクイズアプリを作成しています.
4
- 回答ボタン(id属性値がButton1~4)が押された時に, id属性値がnextのボタンにイベントハンドラを追加することによって, "次に進む"(id属性値がnextのボタン)が押された時にnextQuestion関数が呼び出されるようにしたいです.
4
+ 回答ボタン(id属性値がButton1~4)が押された時に, "次に進む"ボタン(id属性値がnext)にイベントハンドラを追加することによって, "次に進む"(id属性値がnextのボタン)が押された時にnextQuestion関数が呼び出されるようにしたいです.
5
- 現状では, scriptタグ内のcheckTheAnswer関数内にある, addEventListenerメソッドによるイベントハンドラの登録ができていないようです. しかし, 1行上の"次に進む"ボタンの背景色の変更は動作しています.
5
+ 現状では, scriptタグ内のcheckTheAnswer関数内にある, addEventListenerメソッドによるイベントハンドラの登録をしているのですが問題文及び選択肢が更新されません. しかし, 1行上の"次に進む"ボタンの背景色の変更は動作しています.
6
6
  ```gs
7
7
  var sheet = SpreadsheetApp.getActiveSpreadsheet().getSheetByName("シート1"); // "シート1"を取得
8
8