JavaScript DOM Manipulation Quiz

JavaScript DOM Manipulation Quiz

12th Grade

15 Qs

quiz-placeholder

Similar activities

Jaringan Komputer

Jaringan Komputer

12th Grade

10 Qs

Quiz Struktur Data

Quiz Struktur Data

9th Grade - University

20 Qs

FE METER REVIEW 5

FE METER REVIEW 5

12th Grade

15 Qs

Data Structures

Data Structures

10th Grade - University

18 Qs

Linked List

Linked List

12th Grade

10 Qs

IBDP Computer Science: abstract data structures

IBDP Computer Science: abstract data structures

12th Grade

20 Qs

Technical Terms - Internet (A-Z) - DOM

Technical Terms - Internet (A-Z) - DOM

12th Grade

10 Qs

Topic 4.1 Introduction to Java

Topic 4.1 Introduction to Java

12th Grade

20 Qs

JavaScript DOM Manipulation Quiz

JavaScript DOM Manipulation Quiz

Assessment

Quiz

Computers

12th Grade

Hard

Created by

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

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?