/ Published in: JavaScript
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<script language="javascript" type="text/javascript"> function subMenu(show) { if (show){ document.getElementById('sub_menu').style.display = 'block'; } else { document.getElementById('sub_menu').style.display = 'none'; } } </script> <div class="top_menu"> <a href="index.html">Home</a> | <a href="link.html" onmouseover="javascript:subMenu(true);" onmouseout="javascript:subMenu(false);">SubmenuLink</a> | <a href="link.html">other Link 1</a> | <a href="link.html">other link 2</a> | </div> <div style="display:none" id="sub_menu" onmouseover="javascript:subMenu(true);" onmouseout="javascript:subMenu(false);"> <a href="link.html">sub 1</a> | <a href="link.html">sub2</a> | </div>