This article describes the solution to the mouse in IE by triggering mouseout through option. Share it for your reference. The specific analysis is as follows:
Functions to be implemented:
There is a DIV, when the mouse passes by, this DIV is fully expanded, and when the mouse moves away, the DIV retracts back, and there is a select selection box inside the DIV;
When operating select, a problem will occur in IE. When the mouse passes through option, the DIV will shrink back, but this phenomenon is not the case in other browsers.
Solution:
In IE, when the mouse moves to option, the value of window.event.toElement is null, and the value in other browsers is object;
When the mouse is moved directly from the DIV, the value of window.event.toElement is object, and so are other browsers;
In summary, you can add the following code to mouseout to solve the problem:
if (window.event.toElement == null) return;
I hope this article will be helpful to everyone's JavaScript programming.