Javascript examples for DOM Event:Element Event Attribute
The oncut event occurs when the user cuts the content of an element.
Bubbles | Yes |
---|---|
Cancelable | Yes |
Event type: | ClipboardEvent |
Supported HTML tags: | All HTML elements |
<!DOCTYPE html> <html> <body> <input type="text" id="myInput" value="Try to cut this text"> <script> document.getElementById("myInput").oncut = function() {myFunction()}; function myFunction() {//from ww w .jav a 2 s .c o m console.log("You cut text!"); } </script> </body> </html>