DataTransfer.files - Web APIs 编辑
The DataTransfer.files
property is a list of the files
in the drag operation. If the operation includes no files, the list is empty.
This feature can be used to drag files from a user's desktop to the browser.
Syntax
dataTransfer.files;
Return value
A list
of the files in a drag operation, one list item for each file in the operation. If the drag operation had no files, the list is empty.
Example
There are two live examples of this interface:
- Firefox only: http://jsfiddle.net/9C2EF/
- All browsers: https://jsbin.com/hiqasek/
Specifications
Specification | Status | Comment |
---|---|---|
HTML Living Standard The definition of 'files' in that specification. | Living Standard | |
HTML 5.1 The definition of 'files' in that specification. | Recommendation | Initial definition |
Browser compatibility
BCD tables only load in the browser
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论