JavaScript Reference/Javascript Methods/clearData — различия между версиями
Admin (обсуждение | вклад) м (1 версия) |
|
(нет различий)
|
Текущая версия на 08:22, 26 мая 2010
"clearData()" Example
<html>
<body>
<button onclick="clipboardData.setData("Text",document.selection.createRange().text);">
Copy
</button>
<button onclick="myText.value = clipboardData.getData("Text");">Paste</button>
<button onclick="clipboardData.clearData("Text");">Clear clipboard</button>
<p>This is some sample text for you to copy.</p>
<textarea id="myText" style="width:600; height:100"></textarea>
</body>
</html>
"clearData()" is applied to
+----------------+--------------------------------------------------------------+
| Applied_To |clipboardData dataTransfer |
+----------------+--------------------------------------------------------------+
"clearData()" Syntax, Parameters and Note
Note:
Clears the clipboard.
Syntax:
event.objectName.clearData(param1)
Parameters:
param1 Optional; one or more of the following data formats:
Text, URL, File, HTML, and Image.
Leave blank to clear all data formats.