Geschreven door studenten die geslaagd zijn Direct beschikbaar na je betaling Online lezen of als PDF Verkeerd document? Gratis ruilen 4,6 TrustPilot
logo-home
Tentamen (uitwerkingen)

INF 651 Final Exam Questions and Answers.

Beoordeling
-
Verkocht
-
Pagina's
5
Cijfer
A+
Geüpload op
08-09-2022
Geschreven in
2022/2023

INF 651 Final Exam Questions and Answers.

Instelling
Vak

Voorbeeld van de inhoud

INF 651 Final Exam Questions and
Answers
I need to select every other div element inside a section element with the id attribute of
"view1".
Which selector do I need? - ✔ document.querySelectorAll('#view1 div:nth-of-type(2n)')

Select ALL of the things found within the Document Object Model (no partial credit): - ✔
nodes
attributes
elements
whitespace

Which method will select only one element from the DOM? - ✔
document.getElementById()

I need to select ALL of the paragraph elements in the DOM. Which method or methods
will let me do this? (Select ALL that apply) - ✔ document.getElementsByTagName('p')
document.querySelectorAll('p')

The HTML Document Object Model is often referred to as
________________________. - ✔ a tree

I have a div with an id attribute of "divOne". It is inside the body element.
I create a new div like this: var newDiv = document.createElement('div');
I want to add my newDiv to the document AFTER divOne. Which line of code achieves
my goal? - ✔ document.body.appendChild(newDiv);

I create a div element on my page. Inside the div element, I create a paragraph
element.
When discussing the relationship of the div element to the paragraph element, the div is
referred to as the _______________ of the paragraph. - ✔ parent

There are 5 paragraphs in the DOM. I need to change the text color of the 2nd
paragraph to white.
Which line of code will achieve my goal? - ✔ document.getElementsByTagName('p')
[1].style.color = 'white';

The textContent property of an HTML element may contain HTML markup. - ✔ False

I have created a paragraph with javascript. I still need to create the text to go in it.
Which method do I use to create the text? - ✔ document.createTextNode()

Look at the following line of code:

, document.elem.addEventListener('click',function(magic){console.log('abracadabra')};
What does "magic" refer to? - ✔ the event object

When an event triggers on the element that creates the event, and then moves outward
to trigger the same event on a container element, it is called event _______________. -
✔ bubbling

Before calling an initApp() function, it is good practice to listen for the
DOMContentLoaded event OR the _____________________ event of the document so
we know the DOM elements we want to select exist. - ✔ readystatechange

I have created a function named doTheStuff. Select the correct and proper line of code
to call doTheStuff with an event listener: - ✔ button.addEventListener("click",
doTheStuff, false);

Which type of storage may still be retrieved after we close our browser and then revisit
the web app at another time? - ✔ localStorage

I am adding a click event listener to a div. The div is a child of the body element.
The body element already has a click event. If I click on the div, the click event of the
body will also occur.
Help me complete this code by filling in the blank (exact match, case-sensitive) to
prevent the click event of the body from firing.
document.myDiv.addEventListener('click', function(e){
e.___________________ ;
console.log('I hope you get it!');
}); - ✔ stopPropagation()

I have an HTML form. I want to apply form validation via JavaScript instead of letting the
form submit right away. To keep this from happening, JavaScript lets me apply
_____________________ to the submit event. - ✔ preventDefault()

Look at the following line of code:
document.element.addEventListener('click',function(event){console.log(event.target)};
We are listening for the click event. When a click occurs, it calls the anonymous
function.
What is the event.target referring to? - ✔ Whichever element initially triggered the click
event.

The addEventListener has 3 parameters: the event to listen for, the function to call, and
optionally, the ________________. - ✔ useCapture

We use event listeners instead of putting JavaScript inline in our HTML elements. This
separation of concerns is a principle of ___________________________. - ✔
Unobtrusive JavaScript

Geschreven voor

Vak

Documentinformatie

Geüpload op
8 september 2022
Aantal pagina's
5
Geschreven in
2022/2023
Type
Tentamen (uitwerkingen)
Bevat
Vragen en antwoorden

Onderwerpen

$15.99
Krijg toegang tot het volledige document:

Verkeerd document? Gratis ruilen Binnen 14 dagen na aankoop en voor het downloaden kun je een ander document kiezen. Je kunt het bedrag gewoon opnieuw besteden.
Geschreven door studenten die geslaagd zijn
Direct beschikbaar na je betaling
Online lezen of als PDF

Maak kennis met de verkoper

Seller avatar
De reputatie van een verkoper is gebaseerd op het aantal documenten dat iemand tegen betaling verkocht heeft en de beoordelingen die voor die items ontvangen zijn. Er zijn drie niveau’s te onderscheiden: brons, zilver en goud. Hoe beter de reputatie, hoe meer de kwaliteit van zijn of haar werk te vertrouwen is.
academicmaster Chamberlain College Of Nursing
Volgen Je moet ingelogd zijn om studenten of vakken te kunnen volgen
Verkocht
772
Lid sinds
6 jaar
Aantal volgers
676
Documenten
5998
Laatst verkocht
3 weken geleden
MIDTERM & FINALS

Get all latest Quizzes, Test Banks, Midterm and Final Exams. Ace your Exams with My Papers Guaranteed to help you score A in everything.

3.9

111 beoordelingen

5
60
4
16
3
16
2
7
1
12

Recent door jou bekeken

Waarom studenten kiezen voor Stuvia

Gemaakt door medestudenten, geverifieerd door reviews

Kwaliteit die je kunt vertrouwen: geschreven door studenten die slaagden en beoordeeld door anderen die dit document gebruikten.

Niet tevreden? Kies een ander document

Geen zorgen! Je kunt voor hetzelfde geld direct een ander document kiezen dat beter past bij wat je zoekt.

Betaal zoals je wilt, start meteen met leren

Geen abonnement, geen verplichtingen. Betaal zoals je gewend bent via iDeal of creditcard en download je PDF-document meteen.

Student with book image

“Gekocht, gedownload en geslaagd. Zo makkelijk kan het dus zijn.”

Alisha Student

Bezig met je bronvermelding?

Maak nauwkeurige citaten in APA, MLA en Harvard met onze gratis bronnengenerator.

Bezig met je bronvermelding?

Veelgestelde vragen