onmouseleave VS onmouseout

ronitV

New member
onmouseleave VS onmouseout

חג שמח לכולם עד כמה שאני יודעת (עד היום) אז שני האירועים הנ"ל זהים מלבד עניין השייכות ל 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 העסק לא יעבוד. אז מה בעצם ההבדל ביניהם ?
 
../images/Emo2.gif

1. לא יודע מה ההבדל ביניהם, אני מעדיף לעבוד לפי הסטנדרטים ו-onmouseleave לא נמצא. (נסה לבדוק ב-MSDN הסבר לגביו) 2. פעם ראשונה שאני שומע על המאפיין MS_POSITONING
, אתה במקרה עובד עם ASP.NET ?
 

ronitV

New member
פשוט כתבתי את הדוגמא ב VS

גם אם כותבים ב NOTEPAD בלי כל התוספות עדיין מקבלים אותה תוצאה. אז איך עושים תפריט פשוט כמו בדוגמא בלי האירוע הזה ?
 
למעלה