0 votes
in AJAX by
Describe events and their types in Ajax

1 Answer

0 votes
by

When the user or browser interacts with HTML elements, it is termed an event.

Some examples of events are:

onchange – When elements are changed like the text is changed or inserted into the text field.

onclick – HTML elements like button, image, link are clicked.

onload – Loading a page completed by the browser.

onmouseover – When a user moves the mouse over HTML elements like image or text.

Ajax events are of two types: Local events and Global events

Local events – Acts as callbacks inside Ajax request object

Examples: beforeSend, error, complete, success

Global events – triggered on document and calls listening event handlers

Examples: ajaxSend, ajaxSuccess, ajaxError, ajaxComplete

...