Javascript Reference
Categories: onpaste

javascript onpaste Description

@July 17, 2008, 2:05 p.m.
onpaste Firefox/Netscape/NN n/a IE 5(Win) Chrome/Safari/DOM n/a  
  Bubbles: Yes; Cancelable: Yes  

Fires after the user initiates the Paste command (via the Edit menu, a keyboard shortcut, or a context menu) to place a copy of the system clipboard into the selected content. An event handler function for this event can supplement the paste action by retrieving additional data from the clipboardData object (information placed there by one of the copy- or cut-related event handler functions).

 

To give users access to a Paste menu command for an otherwise uneditable element, set event.returnValue to false in the onbeforepaste event handler for the same object as the onpaste event handler. On the other hand, to prevent user pasting system clipboard content, set event.returnValue to false for the onpaste event handler.

 
Typical Targets

All rendered elements.


Powered by Linode.