Jump to content
Fórum Script Brasil
  • 0

Ajuda Sobre Menu Em Javascript


Guest hector

Question

Guest hector

dry.gif

Estou com duvida em uma coisa:

1)Tenho um menu e este menu se abre quando passo o mouse sobre um link.

2)Quando o mouse está sobre o menu ele não desaparece.

3)Agora : quando o mouse sai de cima do menu ele some.

Sobre o nº 3: Como que faço isto neste código abaixo?

<html>

<head>

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

<title>BellSystems Informatica LTDA</title>

<script language="JavaScript1.2">

var menu1=new Array()

menu1[0]='<a href=Test00.htm>Menu item caption00</a><br>'

menu1[1]='<a href=Test01.htm>Menu item caption01 here</a><br>'

menu1[2]='<a href=Test02.htm>Menu item caption02</a><br>'

</script>

<style>

//dont use this only proffesional

<!--

.iewrap1{

position:relative;

height:30px;

}

.iewrap2{

position:absolute;

}

#dropmenu0{

visibility:hide;

z-index:100;

}

-->

</style>

</head>

<body bgcolor="#FFFFFF">

<script language="JavaScript1.2">

//reusable/////////////////////////////

var zindex=100

function dropit2(whichone){

if (window.themenu&&themenu.id!=whichone.id)

themenu.style.visibility="hidden"

themenu=whichone

if (document.all){

themenu.style.left=document.body.scrollLeft+event.clientX-event.offsetX

themenu.style.top=document.body.scrollTop+event.clientY-event.offsetY+18

if (themenu.style.visibility=="hidden"){

themenu.style.visibility="visible"

themenu.style.zIndex=zindex++

}

else{

hidemenu()

}

}

}

function hidemenu(whichone){

if (window.themenu)

themenu.style.visibility="hidden"

}

function hidemenu2(){

themenu.visibility="hidden"

}

if (document.all)

document.body.onclick=hidemenu

//reusable/////////////////////////////

</script>

<span class=iewrap1><span class=iewrap2 onMouseOver="dropit2(dropmenu0);event.cancelBubble=true;return false" style="left: 179px; top: 245px; width: 98px; height: 14px; visibility: visible; background-color: #33CCFF; layer-background-color: #33CCFF; border: 1px none #000000" id="menu1">

<div align="center"><font face=Verdana><b><a href="QuemSomos.htm" target="_blank"><font face="Lucida Sans Unicode" size="2" color="#000000">Quem

Somos</font></a></b></font></div>

</span></span>

<div id=dropmenu0 style="position:absolute;left:0;top:0;layer-background-color:lightyellow;background-color:lightyellow;width:120;visibility:hidden;border:2px solid black;padding:0px">

<script language="JavaScript1.2">

if (document.all)

dropmenu0.style.padding="4px"

for (i=0;i<menu1.length;i++)

document.write(menu1)

</script>

</div>

<script language="JavaScript1.2">

if (document.layers){

document.dropmenu0.captureEvents(Event.CLICK)

document.dropmenu0.onclick=hidemenu2

}

</script>

</body>

</html>

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



  • Forum Statistics

    • Total Topics
      152.2k
    • Total Posts
      651.8k
×
×
  • Create New...