Clear a selection : Selection : Document JAVASCRIPT DHTML TUTORIALS


JAVASCRIPT DHTML TUTORIALS » Document » Selection »

 

Clear a selection



    
<head>
<script language="JavaScript">
   function function1() {
       document.selection.clear();
   }
</script>
</head>
<body>
<p id="myP" contenteditable>
Select any part of it and click the button below.</p>
<button onclick="function1();">Delete selection</button>
</body>
</html>

    
      
      



-

Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .

Follow Navioo On Twitter

JAVASCRIPT DHTML TUTORIALS

 Navioo Document
» Selection