The DOM plays into Ajax in different ways. How you use the DOM depends on how you handle the content delivered from the server. You will be able to address the content as simple text by utilising the responseText attribute of the server response, or you can address it as XML using responseXML. Presuming the content you pull back from the server is an (X)HTML snippet and you have gotten it as responseText, you dismissed content into a particular spot on the page using innerHTML. On the flip side, if the content you pull back is XML and you’ve gotten it as responseXML, you will be able to traverse its DOM, cherry-picking or performing functions on the elements, attributes, and text nodes.
This in all likelihood sounds very puzzling, but it’s pretty comfortable once we check a couple of easy examples.