เมื่อกล่องเลือกแบบเลื่อนลงจะปรากฏในเหตุการณ์ MouseOver จะไม่เลือกแบบเลื่อนลง สารละลาย:
var o = E.RelatedTarget || E.ToElement; // ตัดสินวัตถุที่คุณย้ายไปที่ตัวเลือกในและด้านล่างคือ NULL, Firefox ฯลฯ ไม่ได้กำหนด -
if (! o) return; // ออกสำหรับตัวเลือกโดยไม่ต้องซ่อน
กรณีรหัสที่สมบูรณ์คือ:
<! doctype html public "-// w3c // dtd xhtml 1.0 transitional // en" "http://www.w3.org/tr/xhtml1/dtd/xhtml1-transitional.dtd"> xmlns = "http://www.w3.org/1999/xhtml"> <head> <meta http-equiv = "content-ype" content = "text/html; charset = utf-8"/> <title> type = "text/css">*{margin: 0; padding: 0; list-style: none; border: 0;}. pop_blue {ตำแหน่ง: สัมบูรณ์; เคอร์เซอร์: ตัวชี้; Padding: 10px;}. pop_blue span {display: inline-block; ความกว้าง: 24px; ความสูง: 32px; พื้นหลัง: url (../ images/pop_blue.png) ไม่ต้องทำซ้ำ;}. map_xf .rud1 {width: 210px; ตำแหน่ง: Absolute; Border: 1px Solid #DDD; แสดง: ไม่มี; พื้นหลังสี: #FFFF; padding: 17px 25px;}. map_xf .rud1 li {margin: 0 0 8px;}. map_xf .rud1 อินพุต, .map_xf .rud1 เลือก {ความสูง: 22px;} type = "text/javascript"> $ (function () {$ ('. pop_blue'). hover (function () {$ (นี่) .find ('. rud1'). แสดง (); $ (นี่) .css ("z-index", "9999"); เป็น null, firefox ฯลฯ ไม่ได้กำหนด style = "top: 0px; ซ้าย: 0;"> <span> เลื่อนเมาส์ขึ้น </span> <i> </i> <div style = "top: 10px; ซ้าย: 40px; แสดง: ไม่มี; 1 </potion> <ตัวเลือกค่า = "เลือกยูนิต" เลือก = ""> เลือกยูนิต 2 </ตัวเลือก> <ตัวเลือกค่า = "เลือกยูนิต" เลือก = ""> เลือกยูนิต 3 </petion> <ตัวเลือกค่า = "เลือกยูนิต" เลือก = "> เลือกยูนิต 4 </ตัวเลือก> </select> </li>เมื่อเมาส์ถูกขยับขึ้นจะไม่มีสถานการณ์ที่ไม่เลือกเลือก