EN
Dieser Inhalt ist in Ihrer Sprache leider nicht verfügbar. Im Folgenden finden Sie die englische Version.

onbeforecut event

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)
addEventListener Method object.addEventListener("beforecut", handler, useCapture)

 

Event information

SynchronousNo
BubblesYes
CancelableYes

 

Event handler parameters

pEvtObj [in]

Type: IHTMLEventObj

Standards information

There are no standards that apply here.

Remarks

Creating custom code for cutting requires several steps:

  1. Set event.returnValue=false in the HTMLElementEvents2::onbeforecut event to enable the Cut shortcut menu item.
  2. Specify a data format in which to transfer the selection through the IHTMLDataTransfer::setData method of the clipboardData object.
  3. Invoke the IHTMLDataTransfer::setData method in the HTMLElementEvents2::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
HTMLElementEvents2::onbeforecopy
HTMLElementEvents2::onbeforepaste
oncopy
HTMLElementEvents2::oncut
HTMLElementEvents2::onpaste
IHTMLDataTransfer::setData
Conceptual
About DHTML Data Transfer

 

 

Community-Beiträge

HINZUFÜGEN
Anzeigen:
© 2014 Microsoft