需要针对“带文件的鼠标悬停”事件为HTML5 Fileupload [英] Need event for "mouseover with file" for HTML5 Fileupload

查看:86
本文介绍了需要针对“带文件的鼠标悬停”事件为HTML5 Fileupload的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在为jQuery创建一个新的HTML5上传脚本,并且当用户'用一个文件将'div'悬停时,我必须识别该事件!。
我不想高亮div。

Im working on an new HTML5 upload script for jQuery and i must recognoze the event, when user 'hovers' the div "with a file!!". I wan't to hightlight the div.

推荐答案

对于在html5浏览器中拖动文件,可以使用拖动和放下事件。
您需要的两个事件是 dragenter (当您拖动并且鼠标到达元素时触发)和 dragleave (鼠标在拖动时离开元素时触发)。

For file dragging in html5 browsers, you can use drag and drop events. The two events you need are dragenter (triggered when you drag and the mouse arrives on the element) and dragleave (triggered when the mouse leaves the element on a drag).

另见: http://www.whatwg.org/specs/web-apps/current-work/multipage/dnd.html

这篇关于需要针对“带文件的鼠标悬停”事件为HTML5 Fileupload的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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