selection

This property is used to return the selection object which has been selected by the user or by a script. In order for the selection to be used within a script, it must be converted to a textRange object.

syntax:

document.selection.valid property

This Property is used to access attributes of the following:

document