Javascript Reference
Categories: selection

javascript selection clear( )

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

  

Deletes the content of the current selection in a document. For example, the event handler in the following tag deletes any selected text of the p element two seconds after the user starts making the selection:

<p onselectstart="setTimeout('document.selection.clear( )',2000);>"
 
Parameters

None.

 
Returned Value

None.


Powered by Linode.