CodePudding user response:
& lt; A id="login - BTN" & gt; Button & lt;/a>
<script>
(function () {
Var BTN=document. GetElementById (' login - BTN);
Var box=document. GetElementById (' login box - ');
var timer=null;
Box. onm ouseover=BTN. onm ouseover=function () {
If (timer) clearTimeout (timer)
='block' box. Style. The display;
}
Box. The onm ouseout=BTN. onm ouseout=function () {
The timer=setTimeout (function () {
='none' box. Style. The display;
}, 400);
}
}) ();
</script>
It has a similar, probably means the mouse after the drop-down list, also trigger display the drop-down list