Javascript examples for DOM Event:oncopy
The oncopy event occurs when copying the content of an element.
Bubbles | Yes |
---|---|
Cancelable | Yes |
Supported HTML tags: | All HTML elements |
<!DOCTYPE html> <html> <body> <input type="text" oncopy="myFunction()" value="Try to copy this text"> <script> function myFunction() {/*from w ww . j a v a 2 s . co m*/ console.log("You copied text!"); } </script> </body> </html>