This example that shows how a one-level sub-menu can be constructed.
It has a simple structure but the drawback of this method is that it is
difficult to extend to more levels. one-level sub-menu
This section is here for comparison with the previous examples but we will
not study this example, as using JavaScript to create sub-menus is cumbersome
and difficult.
The example
Sub-menus with JavaScript shows the use of mouse actions to call
JavaScript functions
to make menus visible and invisible. The length of time a menu is
displayed is controlled by a timer. Can create sub-sub-menus but
the JavaScript becomes complex as you have to not hide parent menus
but the current version does hide parent menus.