Empty a selection : Selection « Document « JavaScript DHTML






Empty a selection

    
<html>
<body>
<script language="JavaScript">
function function1() {
    document.selection.empty();
}
</script>
<p onMouseUp="function1();">you release the mouse.</p>
<p>You can select text in this paragraph in various places.</p>
</body>
</html>

    
      
      








Related examples in the same category

1.Selection type
2.Selection type Detail Example
3.Clear a selection