最新国产好看的视频,伊人天堂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
肃南| 甘德县| 河津市| 万源市| 深水埗区| 桂东县| 开阳县| 弥勒县| 耒阳市| 宜阳县| 无为县| 保亭| 宝兴县| 横峰县| 任丘市| 阿城市| 绥滨县| 江油市| 黄山市| 安乡县| 靖边县| 井陉县| 安岳县| 阿巴嘎旗| 宁陕县| 通许县| 鹤岗市| 江都市| 兰西县| 清河县| 大连市| 陈巴尔虎旗| 阜新市| 象山县| 扬中市| 嵊泗县| 竹溪县| 瑞昌市| 建阳市| 四平市| 德令哈市|