CD-448 Part VI . Appendixes Example A majority (Php web hosting)
Sunday, January 27th, 2008CD-448 Part VI . Appendixes Example A majority of examples for other TextRangeobject methods in this chapter use the moveToElementText() method. Listings 19-10 and 19-11 earlier in this chapter show the method within an application context. moveToPoint(x, y) NN2 NN3 NN4 NN6 IE3/J1 IE3/J2 IE4 IE5 IE5.5 Compatibility Example Use The Evaluator to see the moveToPoint() method in action. Begin by creating a text range for the entire BODY element: a = document.body.createTextRange() Now, invoke the moveToPoint() method to a location 100, 100, which turns out to be in the rectangle space of the Results textarea: a.moveToPoint(100,100) If you type a into the bottom text box and view the properties, both the htmlText and text properties are empty because the insertion point represents no visible text content. But if you gradually move, for example, the start point backward one character at a time, you will see the htmlTextand text properties begin to fill in with the body text that comes before the TEXTAREA element, namely the Results: label and the
tag between it and the TEXTAREA element. Enter the following statement into the top text box and click the Evaluate button several times. a.moveStart( character , -1) Enter ainto the bottom text box after each evaluation to list the properties of the range. parentElement() NN2 NN3 NN4 NN6 IE3/J1 IE3/J2 IE4 IE5 IE5.5 Compatibility TextRange.parentElement()
Go visit our java server pages services for a reliable, lowcost webhost to satisfy all your needs.