diff --git a/docs/1-trial-session/13-dom/_samples/add-element-exercise/index.html b/docs/1-trial-session/13-dom/_samples/add-element-exercise/index.html new file mode 100644 index 000000000..29c2f37dc --- /dev/null +++ b/docs/1-trial-session/13-dom/_samples/add-element-exercise/index.html @@ -0,0 +1,14 @@ + + +
+ +diff --git a/docs/1-trial-session/13-dom/_samples/add-element/script.js b/docs/1-trial-session/13-dom/_samples/add-element/script.js index 2d75dea2f..40ecf84d7 100644 --- a/docs/1-trial-session/13-dom/_samples/add-element/script.js +++ b/docs/1-trial-session/13-dom/_samples/add-element/script.js @@ -1,5 +1,6 @@ -const newItem = document.createElement("li"); -newItem.textContent = "おやつ"; - const packingList = document.getElementById("packing-list"); -packingList.appendChild(newItem); + +const snackElement = document.createElement("li"); +snackElement.textContent = "おやつ"; + +packingList.appendChild(snackElement); diff --git a/docs/1-trial-session/13-dom/_samples/change-styles/index.html b/docs/1-trial-session/13-dom/_samples/change-styles/index.html new file mode 100644 index 000000000..80354a018 --- /dev/null +++ b/docs/1-trial-session/13-dom/_samples/change-styles/index.html @@ -0,0 +1,11 @@ + + +
+ +
+ +
+