Edit This Code:
See Result »
<!DOCTYPE html> <html> <body> <p>This example uses the HTML DOM to assign an "oncut" event to an input element.</p> <input type="text" id="myInput" value="Try to cut this text"> <script> document.getElementById("myInput").oncut = function() {myFunction()}; function myFunction() { alert("You cut text!"); } </script> </body> </html>
Result: