Javascript examples for DOM Event:oncopy
Execute a JavaScript when copying an image:
<!DOCTYPE html> <html> <body> <img src="http://java2s.com/resources/a.png" oncopy="myFunction()" width="100" height="132"> <script> function myFunction() {/*w w w . j av a2 s .co m*/ console.log("You copied image!"); } </script> </body> </html>