<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>
Related Scripts with Example Source Code in same category :