<input oncut="myFunction()"> - Javascript DOM Event

Javascript examples for DOM Event:oncut

Description

The oncut event occurs when the user cuts the content of an element.

Summary

Bubbles Yes
Cancelable Yes
Event type: ClipboardEvent
Supported HTML tags: All HTML elements

Demo Code

ResultView the demo in separate window

<!DOCTYPE html>
<html>
<body>

<input type="text" oncut="myFunction()" value="Try to cut this text">

<script>
function myFunction() {//w ww  . j  a  va 2s  .com
    console.log("You cut text!");
}
</script>

</body>
</html>

Related Tutorials