Ver Mensaje Individual
  #2 (permalink)  
Antiguo 23/12/2011, 04:00
dleal100
 
Fecha de Ingreso: septiembre-2011
Mensajes: 158
Antigüedad: 12 años, 7 meses
Puntos: 15
Respuesta: Cannot read property 'style' of null

Código:
<!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" xml:lang="es" lang="es" dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>caca</title></head>
<body>
<script type="text/javascript">
function verocultar() {
	 
          if(document.getElementById("div").style.display=='none') {
               document.getElementById("div").style.display='block';
          } else {
               document.getElementById("div").style.display='none';
          }
     }

</script>
<select name="select" onchange="verocultar();">
<option></option>
<option>caca</option>
</select>

<div id="div">el html</div>

</body>
</html>