The oncopy event occurs when the user copies the content of an element. The
oncopy event also occurs when the user copies an element, for example, an
image, created with the <img> element. The oncopy event is mostly used
on <input> elements with type="text". There are three ways to copy an
element/the content of an element:
- Press CTRL + C
- Select "Copy" from the Edit menu in your browser
- Right click to display the context menu and select the "Copy" command.