Javascript (JS) DOM MCQ

This section focuses on the "Javascript DOM" of the Javascript. These Multiple Choice Questions (mcq) should be practiced to improve the Javascript skills required for various interviews (campus interview, walk-in interview, company interview), placement, entrance exam and other competitive examinations.

1. What among the following is an appropriate event handler for input text among the below options ?

A. onclick
B. onchange
C. onkeyup
D. onblur

View Answer


2. What among the following is an appropriate when an event occurs when the user clicks on an element?

A. onclick
B. onchange
C. onkeyup
D. onblur

View Answer


3. Consider the below code:
Identify the correct code in order to fetch the value entered in username text field?
< body>
< form name="register">
Enter username < input value="John" id="name" name="username">
< /form>
< /body>

A. document.register.name.value
B. document.getElementById ("name").value
C. document.getElementByName ("name").value
D. None of the above

View Answer


4. Consider the below code:
Identify the correct code in order to fetch the value entered in username text field?
< body>
< form name="login">
Enter Your Name< input value="Akash" id="p_name" name="uname">
< /form>
< /body>

A. document.login.uname.value
B. document.getElementById ("p_name").value
C. document.getElementByName ("name").value
D. Both A and B

View Answer


5. Which of the following statements is/are TRUE about DOM?

A. W3C standard
B. Each page can have multiple Document objects
C. form elements can be accessed using the form object
D. Both A and C

View Answer


6. What is the full form DOM?

A. Document Object Model
B. Document Onhalt Model
C. Document Oriented Model
D. Document Oriented Management

View Answer


7. What is the purpose of the Legacy DOM?

A. Modify the nodes
B. Making the script modular
C. Allows access to few keys and elements
D. Makes the scripting easier

View Answer


8. What is the purpose of the NamedNodeMap object?

A. Unordered collection of arrays
B. Unordered collection of elements
C. Unordered collection of nodes
D. Unordered collection of attributes

View Answer


9. Which object is the top of the hierarchy?

A. Form Control Elements
B. Document Object
C. Form Object
D. Window Object

View Answer


10.  How are the objects organized in the HTML DOM?

A. list
B. stack
C. queue
D. Hierarchy

View Answer


11. In Javascript, DOM stands for?

A. Document Oriented Model
B. Document Object Method
C. Document Object Model
D. Document Optimized Model

View Answer


12. The DOM is a ____________ standard.

A. WWW
B. W3C
C. W3B
D. WMB

View Answer


13. The W3C DOM standard is separated into _____ different parts

A. 1
B. 2
C. 3
D. 4

View Answer


14. _________ standard model for all document types.

A. Core DOM
B. XML DOM
C. HTML DOM
D. None of the above

View Answer


15. The HTML DOM is a standard object model and programming interface for HTML.

A. TRUE
B. FALSE
C. Can be true or false
D. Can not say

View Answer






Also check :


Discussion



* You must be logged in to add comment.