Dicas de programação, tratamento de imagens, webdesign

PaidVerts

Posts tagged ‘ocultar’

Exibir e ocultar Div

Um exemplo simples

 

<script type=”text/javascript”>
function escondeDiv() {
document.getElementById(‘suaDiv’).style.display = ‘none’;
}
function mostraDiv() {
document.getElementById(‘suaDiv’).style.display = ‘block’;
}
</script>

<a href=”#” onclick=’escondeDiv()’>—-</a>
<a href=”#” onclick=’mostraDiv()’>++++</a>

<div id=’suaDiv’ style=’width:300px; height:300px; z-index:2; position:relative; border:1px solid red; display:none;’>
Oi rs
</div>

Tag Cloud