FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
JavaScript-DOM-Tutorial/app.js at lesson-7 · SegaManX/JavaScript-DOM-Tutorial · GitHub
SegaManX
JavaScript-DOM-Tutorial
Repository navigation
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
JavaScript-DOM-Tutorial
/
app.js
Copy path
More file actions
More file actions
Latest commit
History
History
History
21 lines (16 loc) · 581 Bytes
Breadcrumbs
JavaScript-DOM-Tutorial
/
app.js
Copy path
File metadata and controls
21 lines (16 loc) · 581 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
const
bookList
=
document
.
querySelector
(
'#book-list'
)
;
console
.
log
(
'book list parent element:'
,
bookList
.
parentElement
)
;
console
.
log
(
'book list parent node:'
,
bookList
.
parentNode
)
;
console
.
log
(
'all node children:'
)
;
Array
.
from
(
bookList
.
childNodes
)
.
forEach
(
function
(
node
)
{
console
.
log
(
node
)
;
}
)
;
console
.
log
(
'all element children:'
)
;
Array
.
from
(
bookList
.
children
)
.
forEach
(
function
(
node
)
{
console
.
log
(
node
)
;
}
)
;
const
titles
=
bookList
.
querySelectorAll
(
'.name'
)
;
console
.
log
(
'Book titles:'
)
;
Array
.
from
(
titles
)
.
forEach
(
function
(
title
)
{
console
.
log
(
title
.
textContent
)
;
}
)
;
Back
|
FazBrowse Home
|
New Git URL