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

clearData Method

Internet Development Index

Removes one or more data formats from the clipboard through dataTransfer or clipboardData object.

Syntax

pret = object.clearData( [sDataFormat])

Parameters

sDataFormat Optional. String爐hat specifies one or more of the following data format values:
TextRemoves the text format.
URLRemoves the URL format.
FileRemoves the file format.
HTMLRemoves the HTML format.
ImageRemoves the image format.

Return Value

No return value.

Remarks

If no sDataFormat parameter is passed, the data formats are cleared.

For drag-and-drop operations, the clearData method of the dataTransfer object is generally used in source events, such as ondragstart. When overriding the default behavior of the target, use clearData in the ondrop event. It is particularly useful for selectively removing data formats when multiple formats are specified.

Example

This example uses the clearData method to remove the Text data format from the clipboard through the dataTransfer object.

<HEAD>
<STYLE>
DIV {background-color:magenta; width: 300;}
SPAN {color:lightgreen;}
</STYLE>
<SCRIPT>
function Source_DragStart(){
event.dataTransfer.setData("Text", "This text will be cleared");
}
function Target_Enter(){
window.event.returnValue = false;
event.dataTransfer.clearData("Text");
oTarget.innerText = event.dataTransfer.getData("Text");
}
</SCRIPT>
</HEAD>
<BODY>
<P>Drag the green text and drop it over the magenta DIV.</P>
<SPAN ID="oSource" ondragstart="Source_DragStart()">
Drag this text.
</SPAN>
<P>Drop the text below. The word "null" will appear in the DIV.</P>
<DIV
ID="oTarget" ondragenter="Target_Enter()">
</DIV>
</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, getData, setData
于都县| 翁源县| 普定县| 游戏| 黑山县| 宣化县| 贵溪市| 武平县| 许昌县| 枣强县| 南木林县| 色达县| 浙江省| 金堂县| 天水市| 鹤岗市| 共和县| 通榆县| 兴和县| 闽清县| 武城县| 囊谦县| 托克逊县| 天等县| 泊头市| 屏东县| 同心县| 田林县| 万年县| 鲁山县| 新丰县| 丰都县| 图们市| 合水县| 吉隆县| 蓬莱市| 扎鲁特旗| 鄂尔多斯市| 赤峰市| 玉树县| 额尔古纳市|