Ver Mensaje Individual
  #2 (permalink)  
Antiguo 28/10/2014, 06:32
Avatar de IsaBelM
IsaBelM
Colaborador
 
Fecha de Ingreso: junio-2008
Mensajes: 5.032
Antigüedad: 15 años, 10 meses
Puntos: 1012
Respuesta: Lectura de variables de una estación meteorológica

prueba así
Cita:
<!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=iso-8859-1" />
<title></title>
<script src="archivo.txt"></script>
<script>
function leer(){
console.log(registro);
}
window.onload=function(){setInterval(leer, 10000);} // lee el archivo cada 10 segundos
</script>
</head>
<body>

</body>
</html>
archivo.txt
Cita:
registro = 'valor';
__________________
if(ViolenciaDeGénero) {alert('MUJER ASESINADA');}