Javascript - Hide Divs

Today i will show how to hide/show a Div in Javascript.

Fist you need to have a ID inside a DIV:










Then for example, this function show ("none", shows if hidden before) other DIV with ID "MenuHelp" and hide "MenuPrincipal":

function VaiMenuPrincipal() {   document.getElementById("MenuPrincipal").style.display = "block";   document.getElementById("MenuHelp").style.display = "none";}

Comentários

Mensagens populares deste blogue

Python - Automatização em ISPOL

Linha do Oeste - Breve visita

AMV – Aparelhos de Mudança de Via