Edit This Code:
<!DOCTYPE html>
<html>
<body>

<p oncopy="myFunction()">Try to copy this text</p>

<script>
function myFunction() {
    alert("You copied text!");
}
</script>

</body>
</html>


Result:
Try it Yourself - © w3schools.com
Privacy Policy