IE选项中的选项悬停不起作用 [英] select option hover is not working in IE

查看:164
本文介绍了IE选项中的选项悬停不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我写了一个小代码,在我的多个选择框中获取一些工具提示,
代码是FF中的工作文件,但不是在IE :(



例如:

  $('#select> option')。mouseover(function(){
alert (this).text());
});

任何人都可以帮我吗?

解决方案

在Internet Explorer中,onmouseover不会启动选项元素,实际上,选项元素不会触发鼠标或键盘事件有关可用事件的msdn文档:



http://msdn.microsoft.com/en-us/library/ms535877(VS.85).aspx



编辑 - Google Chrome也是如此(也可能是Safari)。


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 :(

ex:

$('#select > option').mouseover(function(){
  alert($(this).text());
});

Can anyone help me?

解决方案

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

EDIT - The same is true of Google Chrome (and most likely Safari too).

这篇关于IE选项中的选项悬停不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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