getData Method--------------------------------------------------------------------------------Retrieves the data in the specified format from the clipboard through the dataTransfer or clipboardData objects.SyntaxsRetrieveData = object.getData(sDataFormat) ParameterssDataFormat Required. String that specifies one of the following data format values: Text Retrieves data formatted as text. URL Retrieves data formatted as a URL. Return ValueString. Returns the data in the format retrieved from clipboard through the dataTransfer or clipboardData object. Depending on the information contained in setData, this variable can retrieve a path to an image, text, or an anchor URL.ResThe getData method enforces cross-frame security and allows data transfers within the same domain only. To the user this means that dragging a selection between different security protocols, such as HTTP and HTTPS, will fail. In addition, dragging a selection between two instances of the browser with different security levels, where the first instance is set to medium and the second is set to high, will fail. Finally, dragging a selection into the browser from another drag-enabled application, such as Microsoft Word, also will fail. To use the getData method to retrieve data from the clipboard within the oncopy or oncut event, specify window.event.returnValue=false within the event handler script.Examples
ParameterssDataFormat Required. String that specifies one of the following data format values:
Text Retrieves data formatted as text.
URL Retrieves data formatted as a URL.
Return ValueString. Returns the data in the format retrieved from clipboard through the dataTransfer or clipboardData object. Depending on the information contained in setData, this variable can retrieve a path to an image, text, or an anchor URL.ResThe getData method enforces cross-frame security and allows data transfers within the same domain only. To the user this means that dragging a selection between different security protocols, such as HTTP and HTTPS, will fail. In addition, dragging a selection between two instances of the browser with different security levels, where the first instance is set to medium and the second is set to high, will fail. Finally, dragging a selection into the browser from another drag-enabled application, such as Microsoft Word, also will fail. To use the getData method to retrieve data from the clipboard within the oncopy or oncut event, specify window.event.returnValue=false within the event handler script.Examples