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
Q

returns a NodeList containing all elements with a specified name

A

document.getElementsByName( )

26
Q

returns a NodeList containing all elements with a specified tag name

A

document.getElementsByTagName( )

27
Q

returns a Boolean value indicating whether the document has focus

A

document.hasFocus( )

28
Q

returns the element of the document

A

document.head

29
Q

returns the collection of all <img></img> elements in the document

A

document.images

30
Q

returns the DOMImplementation object that handles this document

A

document.implementation

31
Q

imports a node from another object

A

document.importNode( )

32
Q

returns the encoding, character set, used for the document

A

document.inputEncoding

33
Q

returns the date and time the document was last modified

A

document.lastModified

34
Q

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

A

document.links

35
Q

removes empty text nodes, and joins adjacent nodes

A

document.normalize( )

36
Q

Removes empty text nodes and joins adjacent nodes

A

document.normalizeDocument( )

37
Q

opens an HTML output stream to collect output from document.write( )

A

document.open( )

38
Q

returns the first element that matches a specified CSS selector(s) in the document

A

document.querySelector( )

39
Q

returns a static NodeList containing all elements that matches a specified css selector(s) in the document

A

document.querySelectorAll( )

40
Q

returns the (loading) status of the document

A

document.readyState

41
Q

returns the URL of the document that loaded the current document

A

document.referrer

42
Q

removes an event handler from the document (that has been attached with the addEventListener( ) )

A

document.removeEventListener( )

43
Q

renames the specified node

A

document.renameNode( )

44
Q

returns a collection of elements in the document

A

document.scripts

45
Q

sets or returns whether error-checking is enforced or not

A

document.strictErrorChecking

46
Q

sets or returns the title of the document

A

document.title

47
Q

returns the full URL of the HTML document

A

document.URL

48
Q

writes HTML expressions or JavaScript code to a document

A

document.write( )

49
Q

Same as write( ), but adds a newline character after each statement.

A

document.writeIn( )