Wenn das Dropdown-Feld aus auswählen im Mausover-Ereignis angezeigt wird, wird die Dropdown-Auswahl nicht ausgewählt. Lösung:
var o = E. E. TOELement; // beurteilen Sie das Objekt, dem Sie übergezogen sind, und wechseln Sie zur Option auf und darunter Null, Firefox usw. ist undefiniert. .
if (! o) return; // beenden Sie zur Option, ohne sich zu verstecken
Der vollständige Code -Fall lautet:
<! DocType html public "-// w3c // dtd xhtml 1.0 transitional // en" "http://www.w3.org/tr/xhtml1/dtd/xhtml1-transsitional.dtd"><Htmlmlml 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; Listenstil: Keine; Rand: 0;}. pop_blue {Position: absolut; Cursor: Zeiger; Padding: 10px;}. pop_blue span {display: inline-block; Breite: 24px; Höhe: 32px; Hintergrund: URL (../ Images/pop_blue.png) No-Repeat;}. MAP_XF .RUD1 {WEDTH: 210PX; Position: absolut; Grenze: 1px solide #ddd; Anzeige: Keine; Hintergrundfarbe: #ffff; Padding: 17px 25px;}. MAP_XF .RUD1 LI {Margin: 0 0 8px;}. MAP_XF .RUD1 INPUT, .MAP_XF .RUD1 SELECT {Höhe: 22px;} </style> <script type. type = "text/javaScript"> $ (function () {$ ('. pop_blue'). hover (function () {$ (this) .find ('. Rud1'). show (); $ (this) .css ("z-Index", "9999"); ist null, Firefox usw. ist undefiniert. style = "top: 0px; links: 0;"> <span> Bewegen Sie die Maus nach oben </span> <i> </i> <div style = "top: 10px; links: 40px; Anzeige: Keine; Polsterung: 50px; Hintergrund: blau;"> <ul> <li> <li> </option ". 1 </option> <Option Value = "SELECT UNIT" Selected = ""> Einheit 2 </Option> <Option Value = "SELECT UNIT" Selected = "> Select Unit 3 </option> <Option Value =" SELECT INIT "Selected ="> Select Unit 4 </option> </select> </li> </divisp.Wenn die Maus nach oben bewegt ist, wird keine Situation vorhanden, in der die Auswahl nicht ausgewählt wird.