剪贴板事件:clipboardData 属性
The clipboardData
属性 of the ClipboardEvent
interface holds a DataTransfer
object, which can be used to
- specify what data should be put into the clipboard from the
cut
andcopy
event handlers, typically with asetData(format, data)
call; - obtain the data to be pasted from the
paste
event handler, typically with agetData(format)
call.
See the cut
, copy
, and paste
events documentation for more information.
值
A DataTransfer
object.
The property can be null
when the event is created using the constructor. It is never null
when dispatched by the browser.
规范
规范 |
---|
剪贴板 API 和事件 # clipboardevent-clipboarddata |
浏览器兼容性
BCD 表格仅在浏览器中加载
另请参阅
- 与复制相关的事件:
copy
,cut
,paste
- The
ClipboardEvent
interface it belongs to. - 剪贴板 API