The brain is not good to use, a little things to read a few times to remember, learned things will be several times, sad.
Used to jquery hover, or read the hover source code, or is the United States "frame design", onmouseover and onmouseout bug, but for my brain is not good use, or a few bug-free, see the code
<! DOCTYPE Html>"Utf-8"><style>#div1 {width:200px; height:200px; Background: #ccc; Overflow:hidden;} h2{Width: -%; height:30px; background:red;}</style><script type="Text/javascript">window.onload=function () {varOdiv = document.getElementById ('Div1');/*odiv.onmouseover=function (EV) {var oevent = EV | | event; var ofrom = Oevent.fromelement | | Oevent.relatedtarget; if (Odiv.contains (Ofrom)) {return; } alert (' Move in ')}*/ /*odiv.onmouseenter=function () {alert (' Move in ')}*/Odiv.onmouseout=function (EV) {varoevent = EV | |Event; varOTo = Oevent.toelement | |Oevent.relatedtarget; if(Odiv.contains (oTo)) {return false; } alert ('Move out') } /*odiv.onmouseleave=function () {alert (' Move Out ')}*/}</script>"Div1">Fromelement| by judging the event object | Relatedtarget, judging the mouse source direction Deng
Bugs in onmouseover and onmouseout