Menu Label 1

Mouse Capture Menu Sample #1

This sample uses the mouse capture functionality of Microsoft® Internet Explorer 5 and later. When the menu label "Menu Label 1" at the top of the page is clicked, the drop-down menu will open and display "Menu Items".

While the drop-down menu is open and "Menu Item 1" is visible, try to click on the anchor "Test". You will notice that the anchor does not fire and the menu closes. When the menu closes, the anchor will function. This happens because the menu is capturing mouse events, so onclick events go to the fnSwitchMenu function. The function will prevent the click from continuing, but will close the menu and release mouse capture.

Test Mouse Capture.



© 1999 Microsoft Corporation. All rights reserved. Terms of use.