METHOD:  Document::getSelection Netscape Only Feature


document.getSelection( )

This method can be used to return a string containing any selected text in the current document.

The following code, when placed in a form in the current document, will display any selected text in a message box when the button is clicked.

Code:
<INPUT TYPE="BUTTON" NAME="selectString" VALUE="Show
any highlighted text" onClick="alert('The following text is
selected:\n'+document.getSelection());">


Copyright 1999-2001 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information