MCQ Single Best Answer Easy

QWhat is the purpose of the onreadystatechange event in AJAX?

ID: #19097 What is AJAX 90 views
Question Info
#19097Q ID
EasyDifficulty
What is AJAXTopic

Choose the Best Option

Click any option to instantly check if you're correct.

  • A To handle errors during AJAX requests
  • B To specify the request method
  • C To define the callback function for handling server responses
  • D To set the content type of the request
Correct Answer: Option C

Explanation

The onreadystatechange event in AJAX is used to define a callback function that will be executed when the state of the XMLHttpRequest object changes, indicating different stages of the request-response cycle.

Share This Question

Challenge a friend or share with your study group.