IHTMLSelectionObjectIHTMLSelectionObject*
*



Contents  *



Index  *Topic Contents
*Previous Topic: IHTMLSelectElement::tags
*Next Topic: IHTMLSelectionObject::createRange

IHTMLSelectionObject


This interface provides the access methods for the selection object representing the active selection, a highlighted block of text and/or other elements in the document upon which a user or a script can carry out some action. You typically use the selection object as input from the user identifying what portion of the document to act on, or as output to the user showing the results of an action.

Users and scripts both can create selections. Users create selections by dragging the mouse over a portion of the document. Scripts create them by calling the select method on a text range or similar object. You can retrieve the active selection by applying the selection keyword to the document object. To carry out work on a selection, you can create a text range object from the selection by using the createRange method.

A document can have only one selection at a time. The selection has a type that determines whether it is empty or contains a contiguous block of consecutive text and/or elements. Although an empty selection contains nothing, it is useful for marking a position in the document.

IHTMLSelectionObject Methods
createRange   empty  
clear   get_type  


Up Top of Page
© 1997 Microsoft Corporation. All rights reserved. Terms of Use.