stud
bud
Sign up
Log in
Home
Library
Explore
SAT
More
DOM and BOM JS Flashcards | StudBud
Explore
/
DOM and BOM JS
DOM and BOM JS
10 terms
·
StudBud Administration
·
14 plays
Imported from external platform
Flashcards
10 cards
F
Practice quiz
P
Host live
L
Questions
10
Answers
1
Which method is used to access an element by its ID in the DOM?
getElementsByTagName
getElementById
querySelector
getElementsByClassName
2
Which of the following interfaces allows JavaScript to interact with the browser window and its components?
BOM
CSSOM
HTML
DOM
3
What does the 'document' object represent in the DOM?
The browser itself
A specific CSS file
The JavaScript functions running on the page
The HTML document that is loaded in the browser
4
Which of the following is a method to remove an HTML element from the DOM?
removeChild
appendChild
createElement
insertBefore
5
Which method can be used to change the content of an HTML element in the DOM?
style
innerHTML
setAttribute
classList
6
Which of the following properties does the BOM provide access to?
document.body
document.cookie
document.title
window.location
7
What is the primary purpose of the BOM in JavaScript?
To provide interaction with the browser window and its components
To define styles for HTML elements
To manipulate the content of web pages
To handle API requests
8
Which property would you use to access the number of history entries in the BOM?
window.history.state
window.location.href
window.history.length
document.referrer
9
Which method would you use in the DOM to select elements matching a specific CSS selector?
getElementsByName
getElementById
getElementsByTagName
querySelector
10
What does the Document Object Model (DOM) represent in web development?
The styling information of a web page
The JavaScript functions executed on the server
A structured representation of the HTML elements in a web
The graphical interface of the browser