The onpaste
attribute event is triggered
when pasting some content.
None.
<element onpaste="script or Javascript function name">
ALL HTML elements
onpaste |
Yes | Yes | Yes | Yes | Yes |
<!DOCTYPE html>
<html>
<body>
<!-- w w w .j ava 2 s . c om-->
<p onpaste="myFunction()">Cut me by pressing ctrl-x</p>
<script>
function myFunction() {
console.log("onpaste!");
}
</script>
</body>
</html>