oncut Event in JavaScript
oncut Event in JavaScript
The oncut event is used to occur when a user cuts the content of an element. It is mostly used with text and inputs.
Methods used for cutting texts are:-
- Select Cut from Edit menu in browser
- Press CTRL + X
- Right click to display context menu and select Cut command
Syntax:-
Its syntax is:- < anyElement oncut="my_script" > OR object.oncut = function(){my_script} OR object.addEventListener("cut", my_script)