Empty a selection : Selection « Document « JavaScript DHTML
- JavaScript DHTML
- Document
- Selection
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