Javascript Reference
Categories: document

javascript document getSelection( )

@March 15, 2008, 1:22 a.m.
getSelection( ) Firefox/Netscape/NN 4 IE n/a Chrome/Safari/DOM n/a

In Navigator 4, this method captures the current text selection in the document. The method is deprecated in Netscape 6 in favor of the window.getSelection( ) method (which returns a sophisticated selection object, rather than just text). Invoking from the document object displays a warning in the JavaScript Console window, but does not throw a full-fledged exception. The IE equivalent is reading the selection property.

 
Parameters

None.

 
Returned Value

String.


Powered by Linode.