-
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
3 changed files
with
37 additions
and
12 deletions.
There are no files selected for viewing
16 changes: 16 additions & 0 deletions
16
docs/1-trial-session/13-dom/_samples/add-element/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,16 @@ | ||
<!doctype html> | ||
<html lang="ja"> | ||
<head> | ||
<meta charset="utf-8" /> | ||
<title>持ち物リスト</title> | ||
</head> | ||
<body> | ||
<ul id="packing-list"> | ||
<li>お弁当</li> | ||
<li>水筒</li> | ||
<li>タオル</li> | ||
<li>レジャーシート</li> | ||
</ul> | ||
<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,5 @@ | ||
const newItem = document.createElement("li"); | ||
newItem.textContent = "おやつ"; | ||
|
||
const packingList = document.getElementById("packing-list"); | ||
packingList.appendChild(newItem); |
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