我可以检测到焦点的来源吗? (JavaScript,jQuery) [英] Can I detect the source of a focus? (Javascript, jQuery)

查看:67
本文介绍了我可以检测到焦点的来源吗? (JavaScript,jQuery)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

快速提问-是否可以检测到焦点是来自鼠标单击还是来自焦点事件的选项卡?

Quick question - is it possible to detect whether a focus has come from a mouse click or a tab from a focus event?

我想如果没有的话,我将不得不在同一元素上使用单击手柄来确定源,但是我更喜欢焦点事件的一种方法.

I guess if there isn't, I'll have to use a click handle on the same element to determine the source, but I'd prefer a way from the focus event.

谢谢

高斯

推荐答案

可能无法100%起作用,但是如果没有直接方法,那么您不能只使用Mouseover进行检测吗?该人将鼠标移到控件上以将其选中(?)

May not work 100% but if there isn't a direct way then can't you just use Mouseover and detect it? The person will have bring the mouse over the control to select it (?)

这篇关于我可以检测到焦点的来源吗? (JavaScript,jQuery)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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