Ver Mensaje Individual
  #2 (permalink)  
Antiguo 11/11/2013, 17:52
Avatar de IsaBelM
IsaBelM
Colaborador
 
Fecha de Ingreso: junio-2008
Mensajes: 5.032
Antigüedad: 15 años, 10 meses
Puntos: 1012
Respuesta: cerrar div con click al fondo

basandome en el layout que muestras
Cita:
function Cerrar(e, este){
evt = (e.target) ? e.target : window.event.srcElement;
if(evt.parentNode.tagName == 'BODY') este.style.display = 'none';
}

<div style="position:fixed; top:0px; left:0px; width:100%; height:100%; display:block; background-color:#000;" onclick="Cerrar(event,this);">
<div style="width:100px; height:100px; margin:0 auto; background-color:#FFF; display:block;">
Mensaje
</div>
</div>
__________________
if(ViolenciaDeGénero) {alert('MUJER ASESINADA');}