最新国产好看的视频,伊人天堂AV在线,国产Aaaaaa视频,蜜臀视频在线观看一区,人妻av色图,密臀久久久精品影片,青青视频免费观看毛片,久草在线观看视,国产三级精品色情在线

setData Method

Internet Development Index

Assigns data in a specified format to the dataTransfer or clipboardData object.

Syntax

bSuccess = object.setData(sDataFormat, sData)

Parameters

sDataFormat Required. String爐hat specifies the format of the data to be transferred, using one of the following values:
TextTransfers data formatted as text.
URLTransfers data formatted as a URL.
sData Required. String爐hat 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:

trueThe data was successfully added.
falseThe 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>
<SCRIPT>
var sImageURL;
function InitiateDrag()
/*  The setData parameters tell the source object
to transfer data as a URL and provide the path.  */
{
event.dataTransfer.setData("URL", oImage.src);
}
function FinishDrag()
/*  The parameter passed to getData tells the target
object what data format to expect.  */
{
sImageURL = event.dataTransfer.getData("URL")
oTarget.innerText = sImageURL;
}
</SCRIPT>
</HEAD>
<BODY>
<P>This example demonstrates how to use the setData and
getData methods of the dataTransfer object to enable the
source path of the image to be dragged.</P>
<IMAGE ID=oImage SRC="../common/black.gif"
ondragstart="InitiateDrag()">
<SPAN ID=oTarget ondragenter="FinishDrag()">
Drop the image here
</SPAN>
</BODY>
This feature requires Microsoft® Internet Explorer 5 or later. Click the following icon to install the latest version. Then reload this page to view the sample.

Standards Information

There is no public standard that applies to this method.

Applies To

clipboardData, dataTransfer

See Also

About DHTML Data Transfer, clearData, getData
石棉县| 瑞昌市| 隆昌县| 沽源县| 广饶县| 上栗县| 繁昌县| 邵阳县| 仪陇县| 同心县| 鄱阳县| 海盐县| 石泉县| 繁昌县| 西昌市| 海阳市| 康马县| 鸡泽县| 闽侯县| 三台县| 菏泽市| 稻城县| 玉屏| 钦州市| 唐河县| 德格县| 阳泉市| 美姑县| 铜梁县| 大埔县| 阿克苏市| 潜山县| 苍山县| 昭平县| 阳谷县| 双柏县| 常山县| 兖州市| 若尔盖县| 越西县| 云和县|