To help you understand how AJAX works, we've created a small AJAX application:
The AJAX application above contains a div and a button.
The div section is used to display information from the server. When the button is clicked, it is responsible for calling a function called loadXMLDoc():
< div id = " myDiv " > < h2 > Use AJAX to modify the text content </ h2 > </ div > < button type = " button " onclick = " loadXMLDoc() " > Modify content </ button >Next, add a <script> tag to the head section of the page. This tag contains the loadXMLDoc() function:
<head> < script > function loadXMLDoc(){ .... AJAX script execution...} </ script > </ head >The following chapters will explain to you how AJAX works.