<html>
<body>
<p>This example demonstrates how to assign an "oncopy" event to an input element.</p>
<input type="text" oncopy="myFunction()" value="Try to copy this text">
<script>
function myFunction() {
alert("You copied text!");
}
</script>
</body>
<!-- Mirrored from www.w3schools.com/jsref/tryit.asp?filename=tryjsref_oncopy_html by HTTrack Website Copier/3.x [XR&CO'2014], Mon, 27 Jan 2020 03:02:53 GMT -->
</html>