2
I have the following problem I have a <div>
hidden above login field:
<div id="MostraLegenda" class ="legenda" style ="display: none">
<p>Login do Usuario</p>
</div>
She’s with the display: none
, want to use the event onmouseover
and put it as display: block
.
JS:
function mostrarLegenda()
{
var div;
div = document.getElementById("MostraLegenda");
div.setAttribute.apply("style", "display:block");
return true;
}
worked out, just one more question, I can compare with an if so if(div.style.display == 'None'){
– Antonio_Sistema_de_Informacao
Can you, just check
if( elemento.style.display == 'none' //ou 'block')
– Andre Gusmao