The example of this article describes the solution of IE in which the mouse option triggers the mouseout. Share to everyone for your reference. The specific analysis is as follows:
Features to implement:
There is a div, when the mouse passes when this div is fully expanded, when the mouse moved away div shrink back, where the div inside a select box;
When you manipulate select, a problem occurs in IE, and when the mouse is option, the div shrinks back, and there is no such behavior in other browsers.
Way to solve:
In IE, when the mouse is moved to option, the value of window.event.toElement is null, and the value in the other browser is object;
When the mouse is moved directly from the Div, the value of Window.event.toElement is object, and so is the other browser;
In summary, the following code can be added to the mouseout to solve the problem:
if (window.event.toElement = null) return;
I hope this article will help you with your JavaScript programming.