JavaScript Bible, Gold Edition part 194. This book will bring programmers and non-technical professionals, including casual programmers and scripters, painlessly up to speed on all aspects of mastering JavaScript. Key topics include programming fundamentals, JavaScript language elements and how to use them effectively, and how to easily and efficiently add powerful new functionality to HTML documents and Java applets. | CD-422 Part VI Appendixes You can continue to experiment by setting the start and end points to other element and text nodes on the page. After each adjustment verify the properties of the a range object and the text it encompasses via . setEndAfter nodeReference setEndBefore nodeReference setStartAfter nodeReference setStartBefore nodeReference NN2 NN3 NN4 NN6 IE3 J1 IE3 J2 IE4 IE5 Compatibility Example Use The Evaluator Chapter 13 to experiment with all four methods. Begin by creating a new rnge object. a For the first range set the start and end points to encompass the myEM element inside the myP element myEM myEM The text encompassed by the range consists of the word all plus the trailing space that is contained by the myEM element. Prove this by entering the following statement into the top text box Next adjust the start point of the range to the beginning of the first text node of the myP element myP .firstChild Enter a into the bottom text box to see that the startParent property of the range is the P element node while the endParent property points to the EM element. You can continue to experiment by setting the start and end points to before and after other element and text nodes on the page. After each adjustment verify the properties of the a range object and the text it encompasses via . Appendix F Examples from Parts III and IV CD-423 surroundContents nodeReference NN2 NN3 NN4 NN6 IE3 J1 IE3 J2 IE4 IE5 Compatibility Example Listing 19-6 which relies on selection and Range object features not implemented in the first release of NN6 demonstrates how the surroundContents method wraps a range inside a new element. As the page loads a global variable newSpan stores a SPAN element that is used as a prototype for elements to be used as new surrounding parent