【发布时间】:2013-02-08 22:25:44
【问题描述】:
我的代码仅适用于 Firefox。这是为什么呢?
HTML:
<select id="selecter">
<option>one</option>
<option>two</option>
<option>three</option>
</select>
Javascript:
$(function() {
$(document).on("mouseover", "#selecter option",function(){
alert(1)
});
});
我很好奇为什么 IE 和 chrome 不会触发 mouseover 事件。请参阅此 JSFiddle:http://jsfiddle.net/yT6Y5/72/(在 Firefox 中完美运行。)
如何让 IE 和 Chrome 触发鼠标悬停事件?
【问题讨论】:
标签: javascript jquery html internet-explorer google-chrome