When creating interactive and responsive web applications it's vital to be able to access DOM elements for manipulation and processing. Ext JS provides multiple methods of retrieving references to those DOM elements, which we will explore in this recipe.
Ext JS wraps basic DOM elements up in a class called
, which is what we generally deal with when retrieving DOM elements and manipulating them. It provides a large number of helpful methods to make life easy for us.
Imagine an HTML page, with the Ext JS 4 library loaded into it, containing the following HTML fragment:
<h1 id=－book-title－>Ext JS 4 Cookbook</h1> <h2>Authors</h2> <ul id="authors"> <li>Stuart Ashworth</li> <li>Andrew Duncan</li> </ul> ...