HTML onpaste event Attribute

❮ HTML Event Attributes

Example

<input type="text" onpaste="myFunction()" value="Try to paste text!">

Meaning

The onpaste attribute specifies the script to be run when the user pastes some content in an element.


Standard Syntax

<element onpaste="script">

Browser Support




Status







Attribute Values

Value Description
script Specifies the script to be run on onpaste



Technical Details

Supported HTML elements:

<>
❮ HTML Event Attributes