MCQ Bank
onreadystatechange triggers when:
- A) State changes
- B) Form submits
- C) User clicks
- D) Page loads
What is the function of the prepend() method?
- A) Adds content after elements
- B) Adds content at the end
- C) Adds content at the beginning of elements
- D) Deletes content
What does parents() method return?
- A) Only child elements
- B) All ancestor elements up to the root element
- C) Only the direct parent
- D) Only sibling elements
What does the text() method return?
- A) Attribute values
- B) CSS styles
- C) Only the text content of elements
- D) HTML code
What does the removeClass() method do in jQuery?
- A) Switches between adding and removing classes automatically
- B) Removes one or more specified classes from selected elements
- C) Applies animation effects to elements
- D) Adds one or more classes to selected elements
Queue functionality means:
- A) No order
- B) All animations run together
- C) Animation stops
- D) Animations run one by one
What must be passed to an event method to define its action?
- A) String
- B) Number
- C) Boolean
- D) Function
XML files are:
- A) Binary files
- B) Video files
- C) Encrypted files only
- D) Text files that are readable and editable
What does parentsUntil("div") do?
- A) Returns parent elements up to (but not including) the <div> element
- B) Returns sibling elements
- C) Returns all child elements
- D) Returns all parent elements
Which statement about XML element names is correct?
- A) XML element names are case-sensitive
- B) XML element names can contain spaces
- C) XML is case-insensitive
- D) XML element names can start with numbers
What does traversing mean in jQuery?
- A) Adding new elements to the DOM
- B) Changing the style of elements
- C) Moving through and finding elements in the DOM tree
- D) Deleting elements from the page
What does the width() method return in jQuery?
- A) Only margin value
- B) Width including margin
- C) Width including padding
- D) Content width only (excluding padding, border, and margin)
What does it mean that XML is “extensible”?
- A) XML cannot be modified
- B) New elements can be added without affecting existing structure
- C) XML has fixed predefined tags
- D) XML only works with HTML
What does the append() method do?
- A) Removes content
- B) Inserts content at the end of selected elements
- C) Replaces content
- D) Inserts content at the beginning
How are methods executed in a jQuery chain?
- A) In random order
- B) One after another in sequence
- C) In reverse order
- D) All at the same time
Which of the following is NOT a DOM relationship?
- A) Attribute
- B) Child
- C) Parent
- D) Sibling
In $.post(), which parameter is optional?
- A) Both Data and Callback
- B) Callback
- C) Data
- D) URL
The val() method is mainly used for:
- A) Working with images
- B) Adding animations
- C) Styling elements
- D) Getting or setting values of form fields
A callback function executes:
- A) Randomly
- B) Before effect
- C) During effect
- D) After effect completes
Which of the following is the default character encoding for XML documents?
- A) None of the given options
- B) UTF-8
- C) UTF-16
- D) UTF-32