HTML5在Windows之间拖放 [英] HTML5 drag and drop between windows

查看:201
本文介绍了HTML5在Windows之间拖放的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

无论如何,HTML5 Drag&删除功能或/和File API将jpg图像从一个窗口拖动到另一个窗口?



这个想法是我可以从Facebook拖动到不同的浏览器窗口使用自定义的HTML可以获得该图像。



或者至少可以从桌面拖动到浏览器?



非常感谢

解决方案

不知道Windows之间,但肯定来自桌面:



http://studio.html5rocks.com/#Photos



其实,请查看完整的 html5rocks.com 网站的想法。






编辑:



在两个独立的浏览器窗口中打开了此演示,我可以从一个窗口拖到另一个窗口。我也可以从Facebook拖动一个缩略图并将其放入放置区域。



但是,Facebook图像被删除为未知。所以看起来你可以从一个网站下降到另一个网站,但我不知道究竟真的被丢弃了。如果您从Facebook等拖拽,Facebook可能需要使图像或元素具有 draggable 属性集或您的应用程序可以读取的其他内容。



底线是您应该能够使您在可以控制的应用程序之间工作。但是,如果您正在尝试将其与外部应用程序集成,则需要进行一些实验来了解在拖放过程中通过的内容。我没有自己做这个工作,但不应该很难。


is there anyway with the HTML5 Drag & Drop functionality or/and the File API to drag an jpg image from one window to another?

The idea is that I could drag and image from Facebook to a different browser's window with a custom HTML that would get that image.

Or, at least, a way to drag from the Desktop to a browser?

Thanks a lot

解决方案

Not sure about between windows, but certainly from the desktop:

http://studio.html5rocks.com/#Photos

Actually, check out the full html5rocks.com site for ideas.


EDIT:

I just opened this demo in two separate browser windows, and I can drag from one window to the other. I was also able to drag a thumbnail from Facebook and drop it into a drop zone.

However, the Facebook image was dropped as "unknown". So it looks like you can drop from one site to another, but I'm not sure what exactly really gets dropped. If you are dragging from Facebook or such, Facebook may need to have the images or elements have the draggable property set or something else that your application can read.

Bottom line is that you should be able to make it work between applications that you have control over. But if you are trying to integrate it with external apps, you will need to do some experimentation to find out what exactly gets passed during the drag/drop. I haven't done this work myself, but it shouldn't be hard.

这篇关于HTML5在Windows之间拖放的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆