![]() |
VOOZH | about |
The HTML DOM onpaste event occurs when some content is pasted in an element. this event works on every element like in <p> element if contenteditable set is true then we can paste content in <p> element. The HTML DOM onpaste event is mostly used in input element type="text".
Supported Tags:
It supports all HTML Elements.
Syntax:
<element onpaste="myScript">
object.onpaste = function(){myScript};object.addEventListener("paste", myScript);
Example: Using the addEventListener() method.
Output:
Supported Browsers: The browsers supported by HTML DOM onpaste Event are listed below: