マウスオーバーイベントに選択されたドロップダウンボックスが表示されると、選択されたドロップダウンが選択されません。解決:
var o = e.RelatedTarget || e.toelement; //移動したオブジェクトを判断し、Option Optionに移動すると、null、firefoxなどは定義されていません。 。
if(!o)return; //隠さずにオプションの場合は終了します
完全なコードケースは次のとおりです。
< xmlns = "http://www.w3.org/1999/xhtml"> <head> <meta http-equiv = "content-type" content = "text/html; charset = utf-8"/> <タイトルtype = "text/css">*{margin:0; padding:0; list-style:none; border:0;}。pop_blue {position:absolute;カーソル:ポインター;パディング:10px;}。pop_blue span {display:inline-block;幅:24px;高さ:32px;背景:url(../ images/pop_blue.png)no-repeat;}。map_xf .rud1 {width:210px;位置:絶対;境界線:1px solid #ddd;表示:なし;バックグラウンドカラー:#ffff;パディング:17px 25px;}。map_xf .rud1 li {magne:0 0 8px;}。map_xf .rud1 input、.map_xf .rud1 select {height:22px;} </style> <script = "tex type = "text/javascript"> $(function(){$( '。pop_blue')。hover(function(){$(this).find( '。rud1')。show(this)。オプションはnull、firefoxなどですstyle = "top:0px;左:0;"> <span>マウスを移動</span> <i> </i> <div style = "top:10px; left:40px; display:none; padding:50px; clackens:blue;"> <ul> <li> <reect id = "dan"> <option = "selectected =" 1 </option> <option値= "select unit" selected = ""> select unit 2 </option> <option値= "select unit" select "selected =" "> select unit 3 </option> <option" select "selected =" ">選択> </select> </li> </div> </div> </body> </html> </マウスが上昇すると、選択が選択されていない状況はありません。