Ver Mensaje Individual
  #3 (permalink)  
Antiguo 24/10/2011, 12:26
Avatar de Melecio
Melecio
 
Fecha de Ingreso: julio-2011
Ubicación: Coahuila
Mensajes: 320
Antigüedad: 13 años, 8 meses
Puntos: 8
Respuesta: ocultar y mostrar un div

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script>
function ocultarmostrar(){
ver = document.getElementById("div").style.display;

if (ver=='none'){

document.getElementById("div").style.display="";

}else{
document.getElementById("div").style.display="none ";

}



}



</script>
<title>Documento sin t&iacute;tulo</title>
</head>

<body>
<div id="div" >Colocar aquí el contenido para id "div"</div>
<p>
<label>
<input type="submit" name="button" id="button" value="Enviar" onclick="ocultarmostrar()"/>
</label>
</p>
</body>
</html>