Home > Article > Web Front-end > DOM_window object attribute--clipboardData object operation code_javascript skills
The clipboardData object
provides access to predefined clipboard formats for use in editing operations.
Member table
Method Description
clearData Removes one or more data formats from the clipboard through a dataTransfer or clipboardData object.
getData obtains data in the specified format from the clipboard through dataTransfer or clipboardData objects.
setData assigns data to the dataTransfer or clipboardData object in the specified format.
Example
The following example uses the setData and getData methods of the clipboardData object to perform a cut-and-paste operation through the shortcut menu.