Element Object Methods & Properties 2 Flashcards

1
Q

Returns the last child node of an element

A

element.lastChild

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

Returns the last child element of an element

A

element.lastELementChild

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

Returns the namespace URI of an element

A

element.namespaceURI

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

Returns the next node at the same node tree level

A

element.nextsibling

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

Returns the next element at the same node tree level

A

element.nextElementSibling

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

Returns the name of a node

A

element.nodeName

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

Returns the node type of a node

A

element.nodeType

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

Sets or returns the value of a node

A

element.nodeValue

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

Joins adjacent text nodes and removes empty text nodes in an element

A

element.normalize( )

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

Returns the height of an element, including padding, border and scrollbar

A

element.offsetHeight

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

Returns the width of an element, including padding, border and scrollbar

A

element.offsetWidth

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

Returns the horizontal offset position of an element

A

element.offsetLeft

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

Returns the offset container of an element

A

element.offsetParent

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

Returns the vertical offset position of an element

A

element.offsetTop

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

Returns the root element (document object) for an element

A

element.ownerDocument

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

Returns the parent node of an element

A

element.parentNode

17
Q

Returns the parent element node of an element

A

element.parentElement

18
Q

Returns the previous node at the same node tree level

A

element.previousSibling

19
Q

Returns the previous element at the same node tree level

A

element.previousElementSibling

20
Q

Returns the first child element that matches a specified CSS selector(s) of an element

A

element.querySelector( )

21
Q

Returns all child elements that matches a specified CSS selector(s) of an element

A

element.querySelectorAll( )

22
Q

Removes a specified attribute from an element

A

element.removeAttribute( )

23
Q

Removes a specified attribute node, and returns the removed node

A

element.removeAttributeNode( )

24
Q

Removes a child node from an element

A

element.removeChild( )

25
Replaces a child node in an element
element.replaceChild( )
26
Removes an event handler that has been attached with the addEventListener( ) method
element.removeEventListener( )
27
Returns the entire height of an element, including padding
element.scrollHeight
28
Sets or returns the number of pixels an element's content is scrolled horizontally
element.scrollLeft
29
Sets or returns the number of pixels an element's content is scrolled vertically
element.scrollTop
30
Returns the entire width of an element, including padding
element.scrollWidth
31
Sets or changes the specified attribute, to the specified value
element.setAttribute( )
32
Sets or returns the value of the style attribute of an element
element.style
33
Sets or returns the value of the tabindex attribute of an element
element.tabIndex
34
Returns the tag name of an element
element.tagName
35
Sets or returns the textual content of a node and its descendants
element.textContent
36
Sets or returns the value of the title attribute of an element
element.title
37
Converts an element to a string
element.toString( )
38
Returns the node at the specified index in a NodeList
nodelist.item( )
39
Returns the number of nodes in a NodeList
nodelist.length