When the select drop-down box appears in the mouseover event, the select drop-down is not selected. Solution:
var o = e.relatedTarget || e.toElement;//Judge the object you moved to, move to option on and below is null, firefox, etc. is undefined. .
if (!o) return;//Exit for option without hiding
The complete code case is:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>Unt titled document</title><style type="text/css">*{margin:0;padding:0;list-style:none;border:0;}.pop_blue{ position:absolute; cursor:pointer; padding:10px;}.pop_blue span{ display:inline-block; width:24px; height:32px; background: url(../images/pop_blue.png) no-repeat;}.map_xf .rud1{width:210px; position:absolute;border:1px solid #ddd; display:none; background-color:#ffff;padding:17px 25px;}.map_xf .rud1 li{margin:0 0 8px;}.map_xf .rud1 input,.map_xf .rud1 select{height:22px;}</style><script type="text/javascript" src="jquery-1.9.1.min.js"></script><script type="text/javascript">$(function(){$('.pop_blue').hover(function(){$(this).find('.rud1').show();$(this).css("z-index","9999");},function(e){var o = e.relatedTarget || e.toElement;//Judge the object you move to, move to option is null, firefox, etc. is undefined. . if (!o) return;//Exit for option without hiding $(this).find('.rud1').hide();$(this).css("z-index","0");})})</script></head><body><div style="position:relative;width:100px;height:100px"><div style="top:0px; left:0;"> <span>Move the mouse up</span><i></i><div style="top:10px;left:40px;display:none;padding:50px;background:blue;"><ul><li><select id="dan"><option value="select unit" selected="">Select unit</option><option value="select unit" selected="">Select unit 1</option><option value="select unit" selected="">Select unit 2</option><option value="select unit" selected="">Select unit 3</option><option value="select unit" selected="">Select unit 4</option></select></li></div></div></body></html>When the mouse is moved up, there will be no situation where the select is not selected.