La Web del Programador: Comunidad de Programadores
 
    Pregunta:  14673 - NECESITO EL CODIGO PARA UN MENU EN HTML O JAVA SCRIPT
Autor:  JESUS GPE. MORENO HDEZ.
MI PROBLEMA ES QUE ESTOY CREANDO UNA PAGINA WEB, EN HTML Y NECESITO EL CODIGO PARA HACER QUE, AL DARLE CLIKC EN UN MENU, ABRA UNA NUEVA VENTANA Y APARESCA UN SUBMENU, QUE ESTE ME ENSEƑE 12 OPCIONES.

GRACIAS

  Respuesta:  Oscar GB
usa lo siguiente:

<script language="JavaScript1.2">
<!--
function InitMenup(x,y,a,b)
{ var menup;
if (document.layers) //NetScape
{
menup = document.menup;
menup.left = x;
menup.top = y;
menup.width=a;
menup.height=b;
}
if (document.all) //IExplorer
{
menup = document.all.menup.style
menup.left =x;
menup.top = y;
menup.width=a;
menup.height=b;
}
}
function showMenup()
{
if (document.layers) document.menup.visibility = "show";
if (document.all) document.all.menup.style.visibility = "visible";
}
function hideMenup()
{
if (document.layers) document.menup.visibility = "hide";
if (document.all) document.all.menup.style.visibility = "hidden";
}
//-->
</script>
<STYLE type=text/css>
#Menup {LEFT: 520px; TOP: 173px; VISIBILITY: hidden; WIDTH: 122px; HEIGHT: 400px; POSITION: absolute; z-index:1;}
A#linkB:ACTIVE {text-decoration: none; color: #000099;}
A#linkB:HOVER {color: blue; text-decoration: none;}
A#linkB:VISITED {text-decoration: none; font-family: Verdana;font-size: 12px;}
A#linkB:LINK {text-decoration: none; font-family: Verdana;font-size: 12px;}
}
<style>
<div id="menup" onMouseOver="return showMenup();" onMouseOut="return hideMenup();">
<table border="0" bgcolor="#dddddd" cellspacing="0" cellpadding="0" bordercolor="gray" noshade>
<tr>
<td><a href="Link1">Opcion 1</a><td>
<tr>
<tr>
<td><a href="Link2">Opcion 2</a><td>
<tr>
<tr>
<td><a href="Link3">Opcion 3</a><td>
<tr>
<tr>
<td><a href="Link4">Opcion 4</a><td>
<tr>
<tr>
<td><a href="Link5">Opcion 5</a><td>
<tr>
<tr>
<td><a href="Link6">Opcion 6</a><td>
<tr>
<tr>
<td><a href="Link7">Opcion 7</a><td>
<tr>
<tr>
<td><a href="Link8">Opcion 8</a><td>
<tr>
<tr>
<td><a href="Link9">Opcion 9</a><td>
<tr>
<tr>
<td><a href="Link10">Opcion 10</a><td>
<tr>
<tr>
<td><a href="Link11">Opcion 11</a><td>
<tr>
<tr>
<td><a href="Link12">Opcion 12</a><td>
<tr>
</table>
</div>

Para los submenus los tendras que crear con DIV e invocarlos con javascript