
JavaScript DOM Manipulation Quiz

Quiz
•
Computers
•
12th Grade
•
Hard
Sáng Nguyễn
FREE Resource
15 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What method adds specified class(es) to the classList of an element?
remove(classname)
add(classname)
toggle(classname)
contains(classname)
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which method removes a specified class from an element's classList?
add(classname)
remove(classname)
toggle(classname)
replace(oldclass, newclass)
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What does the toggle(classname) method do?
Both adds and removes a class
Removes a class from the list
Replaces a class in the list
Adds a class to the list
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What does the contains(classname) method return?
True if the class is present
False if the class is present
The class name
An error if the class is not found
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which method is used to create a new DOM element?
document.removeChild()
document.insertBefore()
document.appendChild()
document.createElement()
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What does parent.appendChild(node) do?
Removes a child node
Adds a node at the end of the child list
Inserts a node before another
Replaces a child node
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which method removes a node from the DOM?
parent.replaceChild(new, old)
parent.insertBefore(new, old)
parent.removeChild(node)
node.remove()
Create a free account and access millions of resources
Similar Resources on Wayground
10 questions
computer networking -2

Quiz
•
12th Grade
14 questions
Learning Quizizz

Quiz
•
1st Grade - Professio...
12 questions
UE5 Game Dev Quiz

Quiz
•
12th Grade
12 questions
Kubernetes 101 quiz

Quiz
•
12th Grade
13 questions
Client-server and peer to peer networks

Quiz
•
10th - 12th Grade
17 questions
pohon

Quiz
•
1st Grade - University
12 questions
IT Vocabulary Quiz

Quiz
•
8th Grade - University
15 questions
Data Structures & Algorithm Quiz final

Quiz
•
12th Grade
Popular Resources on Wayground
10 questions
Video Games

Quiz
•
6th - 12th Grade
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
10 questions
UPDATED FOREST Kindness 9-22

Lesson
•
9th - 12th Grade
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
20 questions
US Constitution Quiz

Quiz
•
11th Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade