Javascript DOM Manipulation Quiz eng

Javascript DOM Manipulation Quiz eng

University

13 Qs

quiz-placeholder

Similar activities

Artificial Intelligence Quiz Online

Artificial Intelligence Quiz Online

8th Grade - University

10 Qs

Web App Programming Intro

Web App Programming Intro

University

8 Qs

React Workshop DSC NTU part 1

React Workshop DSC NTU part 1

University

10 Qs

JavaScript

JavaScript

University

13 Qs

JS/DOM/JQuery/HTML/CSS

JS/DOM/JQuery/HTML/CSS

University

18 Qs

GDSC event 16th-march-2024

GDSC event 16th-march-2024

University

12 Qs

IT 123 1st Live Quiz

IT 123 1st Live Quiz

University

15 Qs

AWD Quiz #1

AWD Quiz #1

University

10 Qs

Javascript DOM Manipulation Quiz eng

Javascript DOM Manipulation Quiz eng

Assessment

Quiz

Computers

University

Easy

Created by

E M

Used 2+ times

FREE Resource

13 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the purpose of DOM manipulation in Javascript?

To play audio files

To calculate mathematical equations

To create 3D animations

To dynamically change the content, structure, and style of a web page.

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How do you select an element using its id in Javascript?

document.selectElementById()

document.findElementById()

getElementById()

document.getElementById()

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Explain the process of adding an attribute to an HTML element using Javascript.

element.add('attributeName', 'attributeValue');

element.attributeName = 'attributeValue';

element.setAttribute('attributeName', 'attributeValue');

element.attribute('attributeName', 'attributeValue');

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What are the different methods to work with classes in Javascript DOM manipulation?

getElementById, getElementsByClassName, querySelector, querySelectorAll

addAttribute, getElementsByClassName, querySelector, querySelectorAll

removeElement, getElementsByClassName, querySelector, querySelectorAll

changeStyle

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How can you change the style of an HTML element using Javascript?

element.style.property = newValue;

element.style.change = value;

element.style.property = value;

element.style.modify = newStyle;

6.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

Explain the process of getting the input value from a form using Javascript.

Use the getElementById method to access the form element and retrieve the value using the value property.

Use the getElementsByClassName method to access the form element and retrieve the value using the text property.

Use the querySelector method to access the form element and retrieve the value using the innerHTML property.

Use the getElementById method to access the form element and retrieve the value using the innerText property.

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the difference between innerText and innerHTML in Javascript?

innerText gets the HTML content, innerHTML gets the text content

innerText gets the text content, innerHTML gets the HTML content

innerText and innerHTML are the same thing

innerText is used for styling, innerHTML is used for text manipulation

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?