My goal is to make a program that has a list, and each time the mouse goes over the name of that list, it shows a content of a div
, but then using that code here, I created a vector for each list item but can not get it to show. Can anyone show the error or solution?
<blink>
<html>
<body>
<script type="text/javascript">
function mostra()
{
var arraypilotes=["1","2","3"];
document.getElementById('arraypilotes[i]').style.display = 'block';
}
function esconde()
{
var arraypilotes=["1","2","3"];
document.getElementById('arraypilotes[i]').style.display = 'none';
}
</script>
<a href="#" onmouseover="javascript:mostra();" onmouseout="esconde();">Teste</a>
<div id="arraypilotes[0]" style="display:none;">Conteudo da DIV</div>
<br/>
<br/>
<a href="#" onmouseover="javascript:mostra();" onmouseout="esconde();">Teste2</a>
<div id="arraypilotes[1]" style="display:none;">Conteudo da DIV</div>
<br/>
<br/>
<a href="#" onmouseover="javascript:mostra();" onmouseout="esconde();">Teste3</a>
<div id="arraypilotes[2]" style="display:none;">Conteudo da DIV</div>
</body>
</html>
</blink>