Instruction
- Total number of questions : 10.
- Time alloted : 10 minutes.
- Each question carry 1 mark.
- No Negative marks
- DO NOT refresh the page.
- All the best :-).
1. |
Which is the function used to retrieve a value? |
|||||||||||||||||||
Your Answer: Option (Not Answered) Correct Answer: Option C Explanation: To retrieve a value, pass the name to getItem(). |
2. |
What is the default value of the type attribute? |
|||||||||||||||||||
Your Answer: Option (Not Answered) Correct Answer: Option B Explanation: The default value of the type attribute is “text/javascript”. You can specify this type explicitly if you want, but it is never necessary. |
3. |
Which is the property that represents the content displayed in the window? |
|||||||||||||||||||
Your Answer: Option (Not Answered) Correct Answer: Option A Explanation: One of the most important properties of the Window object is document: it refers to a Document object that represents the content displayed in the window. |
4. |
How to pick a document element based on the value of its id attribute? |
|||||||||||||||||||
Your Answer: Option (Not Answered) Correct Answer: Option B Explanation: The Document object has important methods such as getElementById(), which returns a single document element (representing an open/close pair of HTML tags and all of the content between them) based on the value of its id attribute. |
5. |
Which of the following is a web application API framework? |
|||||||||||||||||||
Your Answer: Option (Not Answered) Correct Answer: Option C Explanation: GWT, the Google Web Toolkit , is a completely different kind of client-side framework. It defines a web application API in Java and provides a compiler to translate your Java programs into compatible clientside JavaScript. |
6. |
To which object does the location property belong? |
|||||||||||||||||||
Your Answer: Option (Not Answered) Correct Answer: Option A Explanation: The location property of the Window object refers to a Location object, which represents the current URL of the document displayed in the window, and which also defines methods for making the window load a new document. |
7. |
What is the purpose of the assign() method? |
|||||||||||||||||||
Your Answer: Option (Not Answered) Correct Answer: Option B Explanation: The assign() method of the Location object makes the window load and display the document at the URL you specify. |
8. |
Which of the below properties can be used for browser sniffing? |
|||||||||||||||||||
Your Answer: Option (Not Answered) Correct Answer: Option C Explanation: The platform and appVersion can be used for browser sniffing. |
9. |
When will the fourth argument to open() useful? |
|||||||||||||||||||
Your Answer: Option (Not Answered) Correct Answer: Option C Explanation: The fourth argument to open() is useful only when the second argument names an existing window. This fourth argument is a boolean value that indicates whether the URL specified as the first argument should replace the current entry in the window’s browsing history (true) or create a new entry in the window’s browsing history (false). Omitting this argument is the same as passing false. |
10. |
Which of the following property refers to the root element of the document? |
|||||||||||||||||||
|