forked from openai/openai-quickstart-node
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdecisionTree.js
29 lines (27 loc) · 889 Bytes
/
decisionTree.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
const subjectInput = document.getElementById("subject-input");
const decisionTreeSelect = document.getElementById("decision-tree-select");
decisionTreeSelect.addEventListener("change", function() {
const selectedOption = decisionTreeSelect.value;
switch (selectedOption) {
case "Option 1":
decisionTreeSelect.innerHTML = `
<option value="Option 1-1">Option 1-1</option>
<option value="Option 1-2">Option 1-2</option>
`;
break;
case "Option 2":
decisionTreeSelect.innerHTML = `
<option value="Option 2-1">Option 2-1</option>
<option value="Option 2-2">Option 2-2</option>
`;
break;
case "Option 3":
decisionTreeSelect.innerHTML = `
<option value="Option 3-1">Option 3-1</option>
<option value="Option 3-2">Option 3-2</option>
`;
break;
default:
break;
}
});