Apache web server - CD-137Appendix F . Examples from Parts III and
CD-137Appendix F . Examples from Parts III and IV document NN2 NN3 NN4 NN6 IE3/J1 IE3/J2 IE4 IE5 IE5.5 Compatibility Example The following simplified function accepts a parameter that can be any object in a document hierarchy. The script finds out the reference of the object s containing document for further reference to other objects: function getCompanionFormCount(obj) { var ownerDoc = obj.document return ownerDoc.forms.length } Because the ownerDocvariable contains a valid reference to a document object, the return statement uses that reference to return a typical property of the document object hierarchy. firstChild lastChild NN2 NN3 NN4 NN6 IE3/J1 IE3/J2 IE4 IE5 IE5.5 Compatibility Example These two properties come in handy for Listing 15-10, whose job it is to either add or replace LI elements to an existing OLelement. You can enter any text you want to appear at the beginning or end of the list. Using the firstChildand lastChild properties simplifies access to the ends of the list. For the functions that replace child nodes, the example uses the replaceChild()method. Alternatively for IE4+, you can modify the innerText property of the objects returned by the firstChild or lastChild property. This example is especially interesting to watch when you add items to the list: The browser automatically renumbers items to fit the current state of the list. elementObject.firstChild
Searching for affordable and proven webhost to host and run your servlet applications? Go to Linux Web Hosting services and you will find it.