Document methods & properties Flashcards

1
Q

returns the currently focused element in the document

A

document.activeElement

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

attaches an event handler to the document

A

document.addEventListener( )

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

adopts a node from another document

A

document.adoptNode( )

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

returns a collection of all <a> elements in the document that have a name attribute</a>

A

document.anchors

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

returns a collection of all element in the document

A

document.applets

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

returns the absolute base URI of a document

A

document.baseURI

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

sets or returns the documents body (the element)

A

document.body

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

closes the output stream previously opened with document.open( )

A

document.close( )

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

returns all name/value pairs of cookies in the document

A

document.cookie

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

creates ana attribute node

A

document.createAttribute( )

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

creates a comment node with the specified text

A

document.createComment( )

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

creates an empty DocumentFragment node

A

document.createDocumentFragment( )

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

creates an Element node

A

document.createElement( )

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

creates a text node

A

document.createTextNode( )

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

returns the Document Element of the document

A

document.doctype

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

returns the mode used by the browser to render the document

A

document.documentElement

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

returns the mode used by the browser to render the document

A

document.documentMode

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

A

document.documentURI

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

A

document.domain

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

OBSOLETE. Returns the DOM configuration of the document

A

document.domConfig

21
Q

returns a collection of all elements of the document

A

document.embeds

22
Q

returns a collection of all elements in the document

A

document.forms

23
Q

returns the element that has the ID attribute with the specified value

A

document.getElementById( )

24
Q

returns a NodeList containing all elements with a specified class name

A

document.getElementsByClassName( )

25
returns a NodeList containing all elements with a specified name
document.getElementsByName( )
26
returns a NodeList containing all elements with a specified tag name
document.getElementsByTagName( )
27
returns a Boolean value indicating whether the document has focus
document.hasFocus( )
28
returns the element of the document
document.head
29
returns the collection of all elements in the document
document.images
30
returns the DOMImplementation object that handles this document
document.implementation
31
imports a node from another object
document.importNode( )
32
returns the encoding, character set, used for the document
document.inputEncoding
33
returns the date and time the document was last modified
document.lastModified
34
document.links
35
removes empty text nodes, and joins adjacent nodes
document.normalize( )
36
Removes empty text nodes and joins adjacent nodes
document.normalizeDocument( )
37
opens an HTML output stream to collect output from document.write( )
document.open( )
38
returns the first element that matches a specified CSS selector(s) in the document
document.querySelector( )
39
returns a static NodeList containing all elements that matches a specified css selector(s) in the document
document.querySelectorAll( )
40
returns the (loading) status of the document
document.readyState
41
returns the URL of the document that loaded the current document
document.referrer
42
removes an event handler from the document (that has been attached with the addEventListener( ) )
document.removeEventListener( )
43
renames the specified node
document.renameNode( )
44
returns a collection of elements in the document
document.scripts
45
sets or returns whether error-checking is enforced or not
document.strictErrorChecking
46
sets or returns the title of the document
document.title
47
returns the full URL of the HTML document
document.URL
48
writes HTML expressions or JavaScript code to a document
document.write( )
49
Same as write( ), but adds a newline character after each statement.
document.writeIn( )