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

回答編集履歴

1

ツールを追加しました

2025/02/01 01:27

投稿

YellowGreen
YellowGreen

スコア868

answer CHANGED
@@ -37,6 +37,22 @@
37
37
  updateMeetingTimeChoices_(item, '_');
38
38
  }
39
39
 
40
+ // すべての製品の選択肢を初期値で更新
41
+ function updateAllChoices() {
42
+ const products = [
43
+ '製品A',
44
+ '製品B',
45
+ '製品C',
46
+ '製品D',
47
+ '製品E',
48
+ '製品F',
49
+ ]
50
+ for (const product of products) {
51
+ console.log('%s を処理中…', product);
52
+ updateChoices(product);
53
+ }
54
+ }
55
+
40
56
  // フォームの選択肢から回答のあったものを削除
41
57
  function onFormSubmit(e) {
42
58
  if (!e) {