最新国产好看的视频,伊人天堂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
上高县| 息烽县| 西藏| 丹江口市| 普定县| 茌平县| 太和县| 盐池县| 会宁县| 吴旗县| 清徐县| 清镇市| 银川市| 扬州市| 平江县| 永平县| 环江| 根河市| 江永县| 凤庆县| 陇西县| 蛟河市| 九江县| 繁昌县| 简阳市| 东平县| 丹棱县| 舞钢市| 友谊县| 赤城县| 东乡族自治县| 石屏县| 淮滨县| 蒙山县| 信宜市| 滨海县| 宁夏| 台安县| 靖边县| 连平县| 深水埗区|