Example:
HTML
<!DOCTYPE html>
<html>
<body>
<p oncopy="myFunction()">Try to copy this text</p>
<script>
function myFunction() {
alert("You copied text!");
}
</script>
</body>
</html>
How to Execute a JavaScript when copying some text of an <input> element | HTML Attribute |
How to Execute a JavaScript when copying some text of a <p> element | HTML Attribute |
How to Execute a JavaScript when copying an image | HTML Attribute |
Type: | Html |
Category: | Web Tutorial |
Sub Category: | HTML Attribute |
Uploaded by: | Admin |