O GoConqr está de visual novo! Conte para nós o que você achou.

Quiz

JavaScript Dom and Events

Junaid Khan 60 perguntas Atualizado em 4 dez 2017

Fazer o quiz

Este quiz tem tempo limite, por isso abre no player de sempre.

Perguntas do quiz (60)

  1. 1Consider the following HTML and JS code. What is the value of pars.length?
    <body>
    <p> Paragraph 1 </p>
    <div id="myDiv">
    <p> Paragraph 2 </p>
    </div>
    </body>
    var myDiv=document.getElementById("myDiv");
    var pars=myDiv.getElementsByTagName("p");
    1. A0
    2. B2
    3. C1
    4. D3
  2. 2Consider the following HTML and JS code. What is the value of pars.length?
    <body>
    <p> Paragraph 1 </p>
    <div id="myDiv">
    <p> Paragraph 2 </p>
    </div>
    </body>
    var myDiv=document.getElementById("myDiv");
    var pars=document.getElementsByTagName("p");
    1. A0
    2. B1
    3. C3
    4. D2
  3. 3In the Prototype library, the $("p") function is equivalent to?
    1. Adocument.createElement("p");
    2. Bdocument.getElementsByTagName("p");
    3. Cdocument.getElementById("p");
    4. Ddocument.getElementByTagName("p");
  4. 4In JavaScript, does the DOM tree include the head section of the HTML page?
    1. AYes
    2. BNo
  5. 5Based on the following JS code which variable is local scoped?
    var a=10;
    function myFunc() {
    var c=document.getElementById("myPar");
    }
    1. Adocument
    2. Ba
    3. Cc
    4. Dboth a and c
  6. 6var myP = document.getElementById("myP");
    myP.children[1].style.backgroundColor = "silver";
    1. ASets the background color to silver of the third child of element id="myP"
    2. BSets the background color to silver of the first child of element id="myP"
    3. CModifies all children of elemetn id="myP"
    4. DSets the second child of element id="myP" background to silver
    5. ESets the element id="myP" background to silver
  7. 7In Javascript, if you wanted to set a timer that calls function "myFunc" every second, which statement would you use?
    1. AsetInterval(1000, myFunc);
    2. BsetRepeat(myFunc, 1000);
    3. CsetInterval(myFunc, 1000);
    4. DsetTimeout(myFunc, 1000, REPEAT);
    5. EsetTimeout(myFunc, 1000);
  8. 8In JavaScript, what command can be used to remove a node from the DOM tree?
    1. Adocument.deleteChild(...)
    2. Bdocument.removeChild(...)
    3. Cdocument.killChild(...)
    4. Ddocument.unappendChild(...)
  9. 9Consider the following HTML code as a DOM tree:
    <div id="myDiv>
    <h1> Hello </h1>
    <p> This is a test. </p>
    <p> This is only <a myid="a" href=""> a test. </a> </p>
    <p> There will be one more test. </p>
    </div>

    Is the element myid="a" a child of the div element?
    1. Ayes
    2. Bno
  10. 10Consider the following HTML code as a DOM tree:

    <div id="myDiv">
    <h1> Hello </h1>
    <p> This is a test. </p>
    <p> This is only <a href=""> a test. </a> </p>
    <p> There will be one more test. </p>
    </div>
    Is the h1 element an ancestor of the element <a>?
    1. Ayes
    2. Bno

Informações

Descrição
EECS 1012- Quiz sobre JavaScript Dom and Events, criado por Junaid Khan em 03-12-2017.
Idioma
English
Visualizações
1
Histórico
Criado em 3 dez 2017 · atualizado em 4 dez 2017
Etiquetas
eecs 1012-
Avaliação
Ainda sem avaliações
Avalie este quiz
Avalie este quiz

Fale Conosco

Sobre o que é sua mensagem?

O que você acha do novo visual?

Você gostou?