যখন ব্যবহারকারী এলিমেন্টের টেক্সট কাট করে, তখন HTML-এ oncut অ্যাট্রিবিউটটি ট্রিগার হয়।
উদাহরণ
নিচের কোডটি চালিয়ে oncut অ্যাট্রিবিউটের ব্যবহার দেখুন:
<!DOCTYPE html> <html> <body> <input type = "text" oncut = "display()" value = "Cut me"> <h2 id = "test">Try to cut the above text.</h2> <script> function display() { document.getElementById("test").innerHTML = "Your cut text worked!"; } </script> </body> </html>