Name

clear( ) — NN n/a IE 4 DOM n/a

Synopsis

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)">

Returned Value

None.

Parameters

None.

Get Dynamic HTML: The Definitive Reference now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.