जब उपयोगकर्ता तत्वों के टेक्स्ट को काटता है, तो ऑनकट HTML में विशेषता ट्रिगर।
उदाहरण
ऑनकट . को लागू करने के लिए आप निम्न कोड को चलाने का प्रयास कर सकते हैं विशेषता -
<!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>