
- HTML Tutorial
- HTML - Home
- HTML - Overview
- HTML - Basic Tags
- HTML - Elements
- HTML - Attributes
- HTML - Formatting
- HTML - Phrase Tags
- HTML - Meta Tags
- HTML - Comments
- HTML - Images
- HTML - Tables
- HTML - Lists
- HTML - Text Links
- HTML - Image Links
- HTML - Email Links
- HTML - Frames
- HTML - Iframes
- HTML - Blocks
- HTML - Backgrounds
- HTML - Colors
- HTML - Fonts
- HTML - Forms
- HTML - Embed Multimedia
- HTML - Marquees
- HTML - Header
- HTML - Style Sheet
- HTML - Javascript
- HTML - Layouts
- HTML References
- HTML - Tags Reference
- HTML - Attributes Reference
- HTML - Events Reference
- HTML - Fonts Reference
- HTML - ASCII Codes
- ASCII Table Lookup
- HTML - Color Names
- HTML - Entities
- HTML - Fonts Ref
- HTML - Events Ref
- MIME Media Types
- HTML - URL Encoding
- Language ISO Codes
- HTML - Character Encodings
- HTML - Deprecated Tags
Which event occurs in JavaScript when an element is content is copied to clipboard?
When a user copies the element’s content, then the oncopy event triggers.
Example
You can try to run the following code to learn how to implement oncopy event in JavaScript.
<!DOCTYPE html> <html> <body> <input type = "text" oncopy = "copyFunction()" value = "copy the text"> <script> function copyFunction() { document.write("Text copied!"); } </script> </body> </html>
- Related Articles
- Which event occurs in JavaScript when an element's content is cut?
- Which event occurs in JavaScript when an element's content is pasted?
- Which event occurs in JavaScript when an element is getting dragged?
- Which event occurs in JavaScript when an element is dragged completely?
- Which event occurs in JavaScript when a dragged element is dropped?
- Which event occurs in JavaScript when the dragging of an element begins?
- Which event occurs in JavaScript when the dragged element is over the target?
- Execute a script when the content of the element is being copied in HTML?
- Which is the event when the browser window is resized in JavaScript?
- Which element is used to insert some content before an element with CSS
- Which element is used to insert some content after an element with CSS
- HTML DOM Clipboard event
- What is an event in JavaScript?
- How to add an event handler to an element in JavaScript HTML DOM?
- How to determine if JavaScript object is an event?

Advertisements