Home | Top | Website design | JavaScript Editor | Get Advanced JavaScript and Ajax Editor, Validator and Debugger! 1st JavaScript Editor. |
Assigns data in a specified format to the dataTransfer or clipboardData object.
Syntax
bSuccess = object.setData( sDataFormat , sData )Parameters
sDataFormat | Required. String that specifies the format of the data to be transferred, using one of the following values:
|
||||
sData | Required. String that specifies the data supplied by the source object. This information can be descriptive text, a source path to an image, or a URL for an anchor. When you pass " URL " as the sDataFormat parameter, you must use the sData parameter to provide the location of the object being transferred. |
Return Value
Boolean . Returns one of the following possible values:
true | The data was successfully added. |
false | The data was not added. |
Remarks
The value of the sDataFormat parameter is not case-sensitive.
Example
This example uses the setData and getData methods with the dataTransfer object to create a shortcut to an image.
<HEAD>
Standards Information
There is no public standard that applies to this method.
Applies To
|
clipboardData , dataTransfer |
Home | Top | Website design | JavaScript Editor | Get Advanced JavaScript and Ajax Editor, Validator and Debugger! 1st JavaScript Editor. |