जब उपयोगकर्ता तत्वों के टेक्स्ट को पेस्ट करता है, तो ऑनपेस्ट HTML में विशेषता ट्रिगर।
उदाहरण
आप पेस्ट . को लागू करने के लिए निम्न कोड को चलाने का प्रयास कर सकते हैं विशेषता -
<!DOCTYPE html>
<html>
<body>
<input type = "text" onpaste = "display()" value = "Paste text here">
<h2 id = "test">Try to paste any text.</h2>
<script>
function display() {
document.getElementById("test").innerHTML = "Your pasted text worked!";
}
</script>
</body>
</html>