Javascript examples for DOM Event:oncopy
Execute a JavaScript when copying some text of a <p> element:
<!DOCTYPE html> <html> <body> <p oncopy="myFunction()">Try to copy this text</p> <script> function myFunction() {//from ww w. j a v a 2s. c o m console.log("You copied text!"); } </script> </body> </html>