Dom And Event Handling(Engineering > Computer Science And Engineering > Javascript ) Questions and Answers
Question 1. Which is the most appropriate database for developers requiring huge amount of data?
Database
Datawarehouse
Web databases
Access
Explanation:-
Answer: Option C. -> Web databases
Developers who need to work with really huge amounts of data like to use databases, and the most recent browsers have started to integrate client-side database functionality into their browsers.
Question 2. Which of the following defines the Cookie visibility?
Document Path
localStorage
sessionStorage
All of the mentioned
Explanation:-
Answer: Option D. -> All of the mentioned
Cookie visibility is scoped by document origin as localStorage and sessionStorage are, and also by document path.
Question 3. A new web browser window can be opened using which method of the Window object ?
createtab()
Window.open()
open()
All of the mentioned
Explanation:-
Answer: Option B. -> Window.open()
You can open a new web browser window with the open() method of the Window object. Window.open() loads a specified URL into a new or existing window and returns the Window object that represents that window.
Question 4. Which of the following property specifies the string of text that was entered?
message
data
string
text
Explanation:-
Answer: Option B. -> data
A textinput event handler has a data property that specifies the string of text that was entered.
Question 5. What is the datatype of the go() method's parameter?
String
Integer
Double
Float
Explanation:-
Answer: Option B. -> Integer
The go() method takes an integer argument and can skip any number of pages forward and backward in the history list.
Question 6. The process by which the browser decides which objects to trigger event handlers on is
Event Triggering
Event Listening
Event Handling
Event propogation
Explanation:-
Answer: Option D. -> Event propogation
Event propagation is the process by which the browser decides which objects to trigger event handlers on.
Question 7. What is the property textContent?
Sets the textual content of a node
Returns the textual content of a node
Both a and b
None of the mentioned
Explanation:-
Answer: Option C. -> Both a and b
The property textContent sets or returns the textual content of a node and its descendants.
Question 8. Which of the following Node types have a node value equal to null?
Document
DocumentFragment
DocumentType
All of the mentioned
Explanation:-
Answer: Option D. -> All of the mentioned
All the three node types namely, Document, DocumentFragment, DocumentType have a node value equal to null.
Question 9. Which of the following key property holds the key name as a string?
keyName
key
keyName(string)
Nameofkey(string)
Explanation:-
Answer: Option B. -> key
The DOM Level 3 Events defines a new key property that contains the key name as a string.
Question 10. The events that represents occurrences related to the browser window are
Window
Element
Display
Handlers
Explanation:-
Answer: Option A. -> Window
Window events represent occurrences related to the browser window itself, rather than any specific document content displayed inside the window.