The Methods of the BODY Element


The Methods of the <BODY> Element

You can see the methods of the <BODY> element in Table 9.11 in overview and in Table 9.12 in depth. Note that JavaScript's core HTML properties, methods, and events, covered in Chapters 5 and 6, also apply to this element.

Table 9.11. The Methods of the <BODY> Element (See Chapters 5 and 6 for the JavaScript core HTML properties, methods, and events that also apply to this element.)

Methods

   

createControlRange

createTextRange

doScroll

Table 9.12. The Methods of the <BODY> Element (See Chapters 5 and 6 for the JavaScript core HTML properties, methods, and events that also apply to this element.)

Method

NS2

NS3

NS4

NS6

IE3a

IE3b

IE4

IE5

IE5.5

IE6

createControlRange

             

x

x

x

 

Returns: A controlRange collection

 

Creates a controlRange collection of selected controls (as opposed to text ranges).

 

Syntax: document.body.createControlRange() .

createTextRange

           

x

x

x

x

 

Returns: A TextRange object

 

Creates a TextRange object for the body, which gives you a way of working with text.

 

Syntax: document.body.createTextRange() . We'll see more on TextRange objects in Chapter 11.

doScroll

             

x

x

x

 

Returns: Nothing

 

This method simulates a click on a scrollbar, enabling you to scroll an object.

 

Syntax: document.body.doScroll([ scrollAction ]) . For the possible values of scrollAction , see "Using doScroll " in this chapter.



Inside Javascript
Inside JavaScript
ISBN: 0735712859
EAN: 2147483647
Year: 2005
Pages: 492
Authors: Steve Holzner

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net