JOBSEEKERS
Login
Sign Up
Jobseeker
Employer
Staffing Firm
Direct Client
Javascript interview questions part 12
Javascript interview questions part 12
Back
Take as many assements as you can to improve your validate your skill rating
Total Questions: 20
1. Consider the following code snippet o.m(x,y); Which is an equivalent code for the above code snippet?
A. o.m(x) && o.m(y);
B. o["m"](x,y);
C. o(m)["x","y"];
D. o.m(x && y);
Show Correct Answer
Correct Answer is :
o["m"](x,y);
2. DOM Level 3 Events standardizes which of the following events?
A. focusarea and focusover
B. focusall and focusnone
C. focusdown and focusup
D. focusin and focusout
Show Correct Answer
Correct Answer is :
focusin and focusout
3. Which of the following are the unnecessary events currently?
A. DOMActivate
B. DOMFocusIn
C. DOMNodeInserted
D. All of the mentioned
Show Correct Answer
Correct Answer is :
All of the mentioned
4. Which object is passed as the argument to handlers for keydown, keyup, and keypress events?
A. KeyboardEvent
B. Key Event
C. Mouse Event
D. Alphabet Event
Show Correct Answer
Correct Answer is :
KeyboardEvent
5. Which among these is a property that reports rotation of mouse wheel axes?
A. ctrlKey
B. alterX
C. alterY
D. deltaX
Show Correct Answer
Correct Answer is :
deltaX
6. Which of the following property specifies the string of text that was entered?
A. message
B. data
C. string
D. text
Show Correct Answer
Correct Answer is :
data
7. Which of the following is defined by the specification?
A. dataMethod
B. input
C. inputMethod
D. inputdataMethod
Show Correct Answer
Correct Answer is :
inputMethod
8. Which two events will have the generated text for key events?
A. key and char
B. char and text
C. text and key
D. key and value
Show Correct Answer
Correct Answer is :
key and char
9. Which of the following are the drag and drop events?
A. drop
B. dragstart
C. both drop and dragstart
D. none of the mentioned
Show Correct Answer
Correct Answer is :
both drop and dragstart
10. Which property holds a DataTransfer object that contains information about the data being transferred and the formats in which it is available?
A. dataTransfer
B. transferData
C. dataExchange
D. exchangeData
Show Correct Answer
Correct Answer is :
dataTransfer
11. Which API allows scripts in a document from one server to exchange messages with scripts?
A. Cross-Document Messaging API
B. Web application API
C. Both Cross-Document Messaging API & Web application API
D. Cross-linking API
Show Correct Answer
Correct Answer is :
Cross-Document Messaging API
12. Which of the following is a way of embedding Client-side JavaScript code within HTML documents?
A. From javascript:encoding
B. External file specified by the src attribute of a “script” tag
C. By using a header tag
D. By using body tag
Show Correct Answer
Correct Answer is :
External file specified by the src attribute of a “script” tag
13. When does JavaScript code appear inline within an HTML file?
A. Between the “script” tag
B. Outside the “script” tag
C. Between or Outside the “script” tag
D. Between the header tag
Show Correct Answer
Correct Answer is :
Between the “script” tag
14. Which character in JavaScript code will be interpreted as XML markup?
A. !
B. >
C. &
D. .
Show Correct Answer
Correct Answer is :
&
15. Which is the root element in a HTML document?
A. HTML
B. HEAD
C. SCRIPT
D. BODY
Show Correct Answer
Correct Answer is :
HTML
16. What is the code for getting the current time?
A. now = new Date();
B. var now = new Date();
C. var now = Date();
D. var now = new Date(current);
Show Correct Answer
Correct Answer is :
var now = new Date();
17. What is the code to start displaying the time when document loads?
A. onload = displayTime;
B. window. = displayTime;
C. window.onload = displayTime;
D. window.onload = start;
Show Correct Answer
Correct Answer is :
window.onload = displayTime;
18. One of the main advantage of using src attribute is
A. It becomes self-cached
B. It makes the HTML file modular
C. It restricts manipulation in the HTML file
D. It simplifies the HTML files
Show Correct Answer
Correct Answer is :
It simplifies the HTML files
19. What will be done if more than one page requires a file of JavaScript code?
A. Downloads that many times
B. Retrives from the browser cache
C. Must be re executed
D. Must be included in all the pages
Show Correct Answer
Correct Answer is :
Retrives from the browser cache
20. What is the default value of the type attribute?
A. text/css
B. text/javascript
C. html
D. xml
Show Correct Answer
Correct Answer is :
text/javascript
Similar Interview Questions
Search for latest jobs
Find Jobs