问题
I've recently been told by a colleague that Firefox 3.6 supports native drag and drop file uploads + image resizing from the operating system without any extensions or plugins required.
Can anyone post a code snippet or provide a link which demonstrates this new functionality (as I couldn't find much on a Google search)?
回答1:
http://hacks.mozilla.org/2009/12/file-drag-and-drop-in-firefox-3-6/
Edit: also https://developer.mozilla.org/en/CSS/-moz-background-size if that's the image resizing you're after
回答2:
It's reasonably non-trivial (for HTML) hence no code snippet, but there's a pretty good HTML DnD tutorial over here.
NB: Updated with correct link. (My bad.)
回答3:
Vimeo has a nice example of drag n drop upload for firefox 3.6 here:
http://www.vimeo.com/6055152
来源:https://stackoverflow.com/questions/2121018/native-drag-drop-file-upload-in-firefox-3-6