HTML Editor
<!DOCTYPE html> <html lang="en-US"> <body> <input type="text" value="Try to copy this text"> <p id="point"></p> <script> var x = document.getElementsByTagName("input")[0]; function myFunction(x){ document.getElementById("point").innerHTML = "You copied text!"; } x.addEventListener("copy", myFunction); </script> </body> </html>
OUTPUT
×

Save as Private