Generic selectors
Exact matches only
Search in title
Search in content
Search in posts
Search in pages
Filter by Categories
nmims post
Objective Type Set
Online MCQ Assignment
Question Solution
Solved Question
Uncategorized

Javascript MCQ Set 1

1. The type that specifies what kind of event occured is
a) event type
b) even target
c) both event type and even target
d) none of the mentioned

View Answer

Answer: a [Reason:] The event type is a string that specifies what kind of event occurred) The type “mousemove”, for example, means that the user moved the mouse.

2. Which is the object on which the event occured or with which the event is associated?
a) event type
b) event target
c) both event type and even target
d) none of the mentioned

View Answer

Answer: b [Reason:] The event target is the object on which the event occurred or with which the event is associated. When we speak of an event, we must specify both the type and the target.

3. In general, event handler is nothing but
a) function
b) interface
c) event
d) handler

View Answer

Answer: a [Reason:] An event handler is in general, a function that handles or responds to an event.

4. When will the browser invoke the handler?
a) Program begins
b) Any event occurs
c) Specified event occurs
d) None of the mentioned

View Answer

Answer: c [Reason:] When an event of the specified type occurs on the specified target, the browser invokes the handler.

5. Which property specifies the property of the event?
a) Type
b) Target
c) Manner
d) All of the mentioned

View Answer

Answer: a [Reason:] All event objects have a type property that specifies the event type.

6. The process by which the browser decides which objects to trigger event handlers on is
a) Event Triggering
b) Event Listening
c) Event Handling
d) Event propogation

View Answer

Answer: d [Reason:] Event propagation is the process by which the browser decides which objects to trigger event handlers on.

7. Which form of event propogation handles the registered container elements?
a) Event Propogation
b) Event Registration
c) Event Capturing
d) Default Actions

View Answer

Answer: c [Reason:] Another form of event propogation, known as event capturing, handlers specially registered on container elements have the opportunity to intercept ( or “capture” ) events before they are delivered to their actual target.

8. The events that are directly tied to a specific input device are
a) Device-independent input events
b) Device-dependent input events
c) User interface events
d) State change events

View Answer

Answer: b [Reason:] These are events that are directly tied to a specific input device, such as the mouse or keyboard) They include legacy event types such as “mousedown”, “mousemove”, “mouseup”, “keydown”, “keypress”, and “keyup” and also new touch specific events like “touchmove” and “gesturechange”.

9. The high-level events among the following events are
a) User interface events
b) Device-independent events
c) Device-dependent events
d) All of the mentioned

View Answer

Answer: a [Reason:] UI events are higher-level events, often on HTML form elements that define a user interface for a web application. They include the focus event (when a text input field gains keyboard focus), the change event when the user changes the value displayed by a form element, and the submit event when the user clicks a Submit button in a form.

10. The events that are not directly tied to a specific input device are
a) User interface events
b) Device-independent events
c) Device-dependent events
d) All of the mentioned

View Answer

Answer: b [Reason:] These are input events that are not directly tied to a specific input device. The click event, for example, indicates that a link or button (or other document element) has been activated) This is often done via a mouse click, but it could also be done by keyboard or (on touch-sensitive devices) by gesture.

Javascript MCQ Set 2

1. Which program code doesn’t need preprocessing before being run?
a) Text
b) Script
c) Both Text and Script
d) None of the mentioned

View Answer

Answer: b [Reason:] A script is program code that doesn’t need pre-processing (e.g. compiling) before being run.

2. What is the significance of scripting?
a) Convenient
b) Dynamic
c) Reachable
d) All of the mentioned

View Answer

Answer: b [Reason:] Scripting makes Web pages more dynamic) For example, without reloading a new version of a page it may allow modifications to the content of that page, or allow content to be added to or sent from that page. The former has been called DHTML (Dynamic HTML), and the latter AJAX (Asynchronous JavaScript and XML).

3. What is the purpose of XMLHttpRequest?
a) Multiple loading
b) Load content by loading new document
c) Load content without loading new document
d) None of the mentioned

View Answer

Answer: c [Reason:] XMLHttpRequest makes it possible to load additional content from the Web without loading a new document, a core component of AJAX.

4. Which API makes the user’s current location available to browser-based application?
a) Java API
b) SDL API
c) Object API
d) Geolocation API

View Answer

Answer: d [Reason:] The Geolocation API makes the user’s current location available to browser-based applications.

5. Which of the following ensures additional interactivity mechanism?
a) WAI ARIA
b) Geolocation API
c) Object API
d) None of the mentioned

View Answer

Answer: a [Reason:] WAI ARIA offers mechanisms to ensure that this additional interactivity remains usable independent of devices and disabilities.

6. What is the necessity to have API?
a) Guide to performing activities
b) Describe particular task
c) Both performing activities and Describe particular task
d) None of the mentioned

View Answer

Answer: b [Reason:] An API may describe the ways in which a particular task is performed.

7. What is the purpose of the event onAirEvent?
a) Content is played
b) Content is transfered
c) Both Content is played and transfered
d) None of the mentioned

View Answer

Answer: a [Reason:] The event onAirEvent is fired when the player starts playing content being broadcasted on the channel.

8. What is the purpose of the event disconnectionEvent?
a) Player demands for disconnection
b) Player disconnects from the channel
c) There is no user interaction
d) None of the mentioned

View Answer

Answer: b [Reason:] The event disconnectionEvent is fired when the player disconnects from the channel, whether a result of user interaction or not.

9. When does one use the event ready?
a) Before loading
b) During loading
c) After loading
d) None of the mentioned

View Answer

Answer: c [Reason:] The event ready is fired after the player is done loading. It is safe to interact with it after this event fired.

10. When does one use the method startOverlays()?
a) Edit ad request
b) Delete ad request
c) Create ad request
d) None of the mentioned

View Answer

Answer: c [Reason:] A new ad request is made every time when the method startOverlays() gets called.

Javascript MCQ Set 3

1. What is the reason for avoiding the attributes property in the HTML DOM?
a) Found unncessary
b) Attributes don’t have attributes
c) Attributes have attributes
d) None of the mentioned

View Answer

Answer: b [Reason:] The reason for avoiding the attributes property in the HTML DOM is because Attributes don’t have attributes.

2. What is the purpose of the method nodeMap.setNamedItem()?
a) Sets ID
b) Sets attribute node
c) Sets element name
d) None of the mentioned

View Answer

Answer: b [Reason:] The method nodeMap.setNamedItem() sets the specified attribute node (by name).

3. How is everything treated in HTML DOM?
a) Node
b) Attributes
c) Elements
d) All of the mentioned

View Answer

Answer: a [Reason:] In the HTML DOM (Document Object Model), everything is a node:

  • The document itself is a document node.
  • All HTML elements are element nodes.
  • All HTML attributes are attribute nodes.
  • Text inside HTML elements are text nodes.
  • Comments are comment nodes.

4. What does the NamedNodeMap object represent in the HTML DOM?
a) Unordered collection of elements
b) Unordered collection of attributes
c) Unordered collection of nodes
d) All of the mentioned

View Answer

Answer: d [Reason:] In the HTML DOM, the NamedNodeMap object represents an unordered collection of an elements attribute nodes.

5. What is the purpose of the Attr object in the HTML DOM?
a) Used to focus on a particular part of the HTML page
b) HTML Attribute
c) Used to arrange elements
d) None of the mentioned

View Answer

Answer: b [Reason:] In the HTML DOM, the Attr object represents an HTML attribute.

6. What is the work of the form control elements in the HTML DOM?
a) User Interface elements
b) All the possible elements
c) Debugging elements
d) None of the mentioned

View Answer

Answer: a [Reason:] Form control elements: The form object contains all the elements defined for that object such as text fields, buttons, radio buttons, and checkboxes.

7. How are the objects organized in the HTML DOM?
a) Class-wise
b) Queue
c) Hierarchy
d) None of the mentioned

View Answer

Answer: c [Reason:] The objects are organized in the hierarchy format in the HTML DOM.

8. Which of the following is a type of HTML DOM?
a) Legacy DOM
b) W3C DOM
c) IE4 DOM
d) All of the mentioned

View Answer

Answer: d [Reason:] All of the above mentioned are types of HTML DOM.

9. What is the purpose of the Legacy DOM ?
a) Makes the scripting easier
b) Allows access to few keys and elements
c) All of the mentioned
d) None of the mentioned

View Answer

Answer: b [Reason:] The Legacy DOM: This is the model which was introduced in early versions of JavaScript language. It is well supported by all browsers, but allows access only to certain key portions of documents, such as forms, form elements, and images.

10. Which object is the top of the hierarchy?
a) Window Object
b) Document Object
c) Form Object
d) Form Control Elements

View Answer

Answer: a [Reason:] Window object is the top of the hierarchy. It is the outmost element of the object hierarchy.

Javascript MCQ Set 4

1. Which side of image map can be created using JavaScript?
a) Server side
b) Client side
c) Both Server and Client side
d) None of the mentioned

View Answer

Answer: b [Reason:] You can use JavaScript to create client side image map.

2. Which is the attribute used to enable the Client-side image map?
a) map
b) area
c) usemap
d) all of the mentioned

View Answer

Answer: c [Reason:] Client side image maps are enabled by the usemap attribute for the “img” tag and defined by special “map” and “area” extension tags.

3. Which are the special tags used for image mapping?
a) map and area
b) map and usemap
c) only map
d) only usemap

View Answer

Answer: a [Reason:] The special tags used for image mapping are map and area.

4. Which is the element that follows the use of “img”?
a) area
b) usemap
c) map
d) any element can follow the use of “img”

View Answer

Answer: c [Reason:] The “map” element actually creates the map for the image and usually follows directly after the “img ” element.

5. What is the purpose of the area element?
a) Area of the text
b) Shape and coordinates of the hotspot
c) Shape and area of the hotspot
d) None of the mentioned

View Answer

Answer: b [Reason:] The area element specifies the shape and the coordinates that define the boundaries of each clickable hotspot.

6. Which of the following is not a navigator property?
a) platform[].
b) plugin[].
c) userAgent[].
d) all of the mentioned

View Answer

Answer: d [Reason:] All of the above mentioned are the properties of a navigator.

7. What is the purpose of the platform[] property in a navigator?
a) Platform of the script
b) Platform where the image map was designed
c) Platform where the browser was compiled
d) All of the mentioned

View Answer

Answer: c [Reason:] The platform[] property is a string that contains the platform for which the browser was compiled.”Win32″ for 32-bit Windows operating systems.

8. What is the purpose of the preference method in a navigator?
a) Set Browser preference
b) Set Netscape preference
c) Both Set Browser & Netscape preference
d) None of the mentioned

View Answer

Answer: b [Reason:] The preference(name,value) method allows a signed script to get and set some Netscape preferences. If the second parameter is omitted, this method will return the value of the specified preference; otherwise, it sets the value. Netscape only.

9. Which of the following is not a navigator method?
a) postEnabled
b) reference
c) preference
d) all of the mentioned

View Answer

Answer: c [Reason:] The preference(name,value) method allows a signed script to get and set some Netscape preferences. If the second parameter is omitted, this method will return the value of the specified preference; otherwise, it sets the value. Netscape only.

10. What is the purpose of the userAgent property?
a) Identifying the data
b) Identifying the client
c) Both Identifying the data and client
d) None of the mentioned

View Answer

Answer: b [Reason:] The userAgent[] property is a string that contains the code name and version of the browser. This value is sent to the originating server to identify the client.

Javascript MCQ Set 5

1. Which of the following are the features of jQuery?
a) Efficient query method for finding the set of document elements
b) Expressive syntax for referring to elements in the document
c) Useful set of methods for manipulating selected elements
d) All of the mentioned

View Answer

Answer: d [Reason:] These features are at the heart of jQuery’s power and utility:

  1. An expressive syntax (CSS selectors) for referring to elements in the document
  2. An efficient query method for finding the set of document elements that match a CSS selector
  3. A useful set of methods for manipulating selected elements
  4. Powerful functional programming techniques for operating on sets of elements as a group, rather than one at a time
  5. A succinct idiom (method chaining) for expressing sequences of operations.

2. Which of the following is a single global function defined in the jQuery library?
a) jQuery()
b) $()
c) Queryanalysis()
d) None of the mentioned

View Answer

Answer: a [Reason:] The jQuery library defines a single global function named jQuery(). This function is so frequently used that the library also defines the global symbol $ as a shortcut for it.

3. Which of the following is a factory function?
a) $()
b) jQuery()
c) Queryanalysis()
d) None of the mentioned

View Answer

Answer: b [Reason:] jQuery() is a factory function rather than a constructor: it returns a newly created object but is not used with the new keyword) jQuery objects define many methods for operating on the sets of elements they represent, and most of this chapter is devoted to explaining those methods.

4. Which is the code that asks for the set of all div elements in a document?

a) var divs = $(div);
b) var divs = jQuery("div");
c) var divs = $("div");
d) var divs = #("div");

View Answer

Answer: c [Reason:] The code to ask for the set of all div elements in a document is

var divs = $("div");

 
 

5. Which is the method that operates on the return value of $()?
a) show()
b) css()
c) click()
d) done()

View Answer

Answer: b [Reason:] The css() method operates on the jQuery object returned by $(), and returns that same object, so that the show() method can be invoked next in a compact “method chain.”

6. Consider the following code snippet

<script src="jquery-1.4.2.min.js"></script>

What does the min mean?
a) Minimised version
b) Miniature
c) Minimised parameters
d) Minimum value

View Answer

Answer: a [Reason:] The min means the minimised version of the library, with unnecessary comments and whitespace removed, and internal identifiers replaced with shorter ones.

7. Which of the following is a heavily overloaded function?
a) jQuery()
b) $()
c) script()
d) Both jQuery() and $()

View Answer

Answer: d [Reason:] The jQuery() function (a.k.a) $()) is the most important one in the jQuery library. It is heavily overloaded, however, and there are four different ways you can invoke it.

8. Which of the following is an equivalent replacement of $(document).ready(f)?
a) jQuery(f)
b) $(f)
c) #(f)
d) None of the mentioned

View Answer

Answer: b [Reason:] The equivalent replacement of $(document).ready(f) is $(f).

9. Which of the following is a utility function in jQuery?
a) jQuery.each()
b) jQuery.parseJSON()
c) jQuery.noConflict()
d) None of the mentioned

View Answer

Answer: c [Reason:] jQuery.noConflict() is the utility function in jQuery.

10. Which of the following is used for parsing JSON text?
a) jQuery.each()
b) jQuery.parseJSON()
c) jQuery.noConflict()
d) None of the mentioned

View Answer

Answer: b [Reason:] jQuery.parseJSON() is used for parsing JSON text.

Synopsis and Project Report

You can buy synopsis and project from distpub.com. Just visit https://distpub.com/product-category/projects/ and buy your university/institute project from distpub.com