Inside JavaScript
The all Property
In the Internet Explorer, the all collection for an HTML element is the same as the all collection for the document objectit holds the elements the HTML element contains. You can see the support for the all property in Table 5.5. Table 5.5. The all Property
As with the document.all collection, you can access any item by ID like this: all("myID") ( all["myID"] also works). Here's an example; in this case, I'm displaying all the properties in the all collection of a formnot only are the two HTML elements, button1 and text1 , displayed when you load this page, but so is the all collection's length property, which gives the number of items in the collection: (Listing 05-02.html on the web site)
<HTML> <HEAD> <TITLE>Using the all Property</TITLE> </HEAD> <BODY> <H1>Using the all Property</H1> <FORM NAME="form1"> <INPUT TYPE="BUTTON" ID="button1" ONCLICK="alert('Hello!')" VALUE="Click |