Javascript examples for DOM Event:addEventListener
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").addEventListener("cut", myFunction); function myFunction() {/*from w ww. j a v a 2 s.c om*/ console.log("You cut text!"); } </script> </body> </html>