Share via


onbeforecut event

[This documentation is preliminary and is subject to change.]

Fires on the source object before the selection is deleted from the document.

Syntax

HTML Attribute <element onbeforecut = "handler(event)">
Event Property object.onbeforecut = handler;
attachEvent Method object.attachEvent("onbeforecut", handler)

Standards information

There are no standards that apply here.

Event information

Synchronous No
Bubbles No
Cancelable No

Event handler parameters

Remarks

Creating custom code for cutting requires several steps:

  1. Set event.returnValue=false in the onbeforecut event to enable the Cut shortcut menu item.
  2. Specify a data format in which to transfer the selection through the setData method of the clipboardData object.
  3. Invoke the setData method in the oncut event.

None.

To invoke this event, do one of the following:

  • Right-click to display the shortcut menu and select Cut.
  • Or press CTRL+X if the selection is within a text field.

The pEvtObj parameter is required for the following interfaces:

See also

Reference

onbeforecopy

onbeforepaste

oncopy

oncut

onpaste

setData

Conceptual

About DHTML Data Transfer

 

 

Build date: 1/23/2012