Advertisement
Home Open Editor ❯

HTML oncopy event Attribute

Example

<input type="text" oncopy="myFunction()" value="Try to copy this text.">

Try this code ❯

Meaning

The oncopy attribute specifies the script to be run when the user copies the content of an element.


Standard Syntax

<element oncopy="script">


Advertisement

Attribute Values

Value Description
script Specifies the script to be run on oncopy

Technical Details

Supported HTML elements:

ALL HTML elements
Home Open Editor ❯
Advertisement