选择选项悬停在 IE 中不起作用 [英] select option hover is not working in IE
本文介绍了选择选项悬停在 IE 中不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我写了一些代码来在我的多选框中获取一些工具提示,该代码在 FF 中是工作文件,但在 IE 中不是:(
I wrote a little code to get some tooltips in my multiple select box, The code is working file in FF but not in IE :(
例如:
$('#select > option').mouseover(function(){
alert($(this).text());
});
有人可以帮我吗?
推荐答案
onmouseover 不会为 Internet Explorer 中的选项元素触发.事实上,选项元素不会触发鼠标或键盘事件.有关可用事件,请参阅 msdn 文档:
onmouseover will not fire for option elements in Internet Explorer. In fact, no mouse or keyboard events fire for option elements. See the msdn documentation for the events available:
http://msdn.microsoft.com/en-us/library/ms535877(VS.85).aspx
编辑 - 谷歌浏览器也是如此(很可能还有 Safari).
EDIT - The same is true of Google Chrome (and most likely Safari too).
这篇关于选择选项悬停在 IE 中不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文