-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
149 additions
and
18 deletions.
There are no files selected for viewing
14 changes: 14 additions & 0 deletions
14
docs/1-trial-session/13-dom/_samples/add-element-exercise/index.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<!doctype html> | ||
<html lang="ja"> | ||
<head> | ||
<meta charset="utf-8" /> | ||
<title>Title</title> | ||
</head> | ||
<body> | ||
<ul id="packing-list"> | ||
<li>お弁当</li> | ||
<li>水筒</li> | ||
</ul> | ||
<script src="./script.js"></script> | ||
</body> | ||
</html> |
11 changes: 11 additions & 0 deletions
11
docs/1-trial-session/13-dom/_samples/add-element-exercise/script.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
const packingList = document.getElementById("packing-list"); | ||
|
||
const snackElement = document.createElement("li"); | ||
snackElement.textContent = "おやつ"; | ||
|
||
packingList.appendChild(snackElement); | ||
|
||
const capElement = document.createElement("li"); | ||
capElement.textContent = "帽子"; | ||
|
||
packingList.appendChild(capElement); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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); |
11 changes: 11 additions & 0 deletions
11
docs/1-trial-session/13-dom/_samples/change-styles/index.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<!doctype html> | ||
<html lang="ja"> | ||
<head> | ||
<meta charset="utf-8" /> | ||
<title>Title</title> | ||
</head> | ||
<body> | ||
<div id="greeting">Hello World!</div> | ||
<script src="./script.js"></script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
const greetingElement = document.getElementById("greeting"); | ||
greetingElement.style.color = "yellow"; | ||
greetingElement.style.backgroundColor = "black"; |
11 changes: 11 additions & 0 deletions
11
docs/1-trial-session/13-dom/_samples/good-evening/index.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<!doctype html> | ||
<html lang="ja"> | ||
<head> | ||
<meta charset="utf-8" /> | ||
<title>Title</title> | ||
</head> | ||
<body> | ||
<div>Good <strong id="greeting-type">morning</strong>!</div> | ||
<script src="./script.js"></script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
const greetingType = document.getElementById("greeting-type"); | ||
greetingType.textContent = "evening"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.