onmouseleave VS onmouseout
חג שמח לכולם עד כמה שאני יודעת (עד היום) אז שני האירועים הנ"ל זהים מלבד עניין השייכות ל IE של onmouseleave . מבחינת הפעולה זה אותו דבר. אך הסתבר לי היום שלא. הנה קטע דוגמא
חג שמח לכולם עד כמה שאני יודעת (עד היום) אז שני האירועים הנ"ל זהים מלבד עניין השייכות ל IE של onmouseleave . מבחינת הפעולה זה אותו דבר. אך הסתבר לי היום שלא. הנה קטע דוגמא
<script> function showDiv(div) { var el = document.getElementById(div); el.style.visibility='visible'; } function hideDiv(div) { var el = document.getElementById(div); el.style.visibility='hidden'; } </script> </HEAD> <body MS_POSITIONING="GridLayout"> <div id="menu1" onmouseleave="hideDiv('sub1')"> <table width="10%" border="0" style="position:absolute; z-index:102;" bgcolor="yellow" cellpadding="0" cellspacing="0"> <tr> <td onmouseover="showDiv('sub1')" width="16.66667%">File</td> </tr> <tr> <td> <div id="sub1" style="POSITION:absolute; VISIBILITY:hidden; z-index:104;"> <table bgcolor="red" width="100%"> <tr> <td onmouseover="showDiv('sub1')">Open</td> </tr> <tr> <td>Close</td> </tr> <tr> <td>Exit</td> </tr> </table> </div> </td> </tr> </table> </div> </body>
אם נחליך את onmouseleave ל onmouseout העסק לא יעבוד. אז מה בעצם ההבדל ביניהם ?