Run
Back to
HTML oncopy Event Attribute
<!DOCTYPE html> <html> <head> <title>oncopy event</title> </head> <body> <input type="text" oncopy="copyAlarm()" value="Copy this text"> <p id="test"> </p> <script> function copyAlarm() { document.getElementById("test").innerHTML="Text has been copied to clipboard!"; } </script> </body> </html>