onbeforecut, oncut, onbeforepaste, and onpaste Events Sample
Steps to demonstrate the events:
- Select the text "Select and Cut this Text" in the light blue div,
avoiding extra spaces.
- Right-click the selected text, and then choose Cut from the shortcut
menu.
- Select the text "Paste the Text Here" in the orange div.
- Right-click the selected text, and then choose Paste from the
shortcut menu.
The onbeforecut event is necessary for enabling the Cut option on
the shortcut menu.
Paste the Text Here
[Right-click and choose View Source from the shortcut
menu.]
© 2007 Microsoft Corporation. All rights reserved. Terms of use.