Section 13/14 - DOM Flashcards

1
Q

native document selector

A

querySelector()

querySelectorAll()

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

how to manipulate styles on dom elements

A

var e = document.getElementById(…)
e.style.color
e.style.border
etc.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

innerHTML

A

html content and text

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

textContent

A

text node only

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

how to manipulate attributes

A

e. getAttribute(‘href’)

e. setAttribute(‘href’, ‘google.com’)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Add Native Event Listener

A
var e = document.querySelector('...');
e.addEventListener('click', function() { ... });
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Remove Native Event Listener

A
var e = document.querySelector('...');
e.removeEventListener('click', listenerFunction);
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

hover event

A

mouseover

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

hover stop event

A

mouseout

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

How to pass event to onclick event added to html

A

<div></div>

How well did you know this?
1
Not at all
2
3
4
5
Perfectly