Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

271
Views
Sitio web que extrae datos de un archivo de texto en cada recarga, no extrae datos

Estoy tratando de crear una lista de tareas que puedo mostrar en el televisor de mi oficina que se recarga cada minuto, enviaré un correo electrónico a una cuenta de servicio y crearé un código para que agregue o elimine tareas en una fecha posterior. Actualmente solo intento que el sitio extraiga las tareas de un archivo de texto y actualice el sitio, pero no extrae los datos. Siento que puedo tener algo mal aquí, si alguien puede ayudar, se lo agradecería mucho.

Los archivos index.html y todo.txt están en el mismo directorio.

 <head> <meta http-equiv="Content-Type" content="text/html; charset=utf8" /> <script type="text/javascript"> function refresh() { var req = new XMLHttpRequest(); console.log("Grabbing Value"); req.onreadystatechange = function () { if (req.readyState == 4 && req.status == 200) { document.getElementById('ToDo').innerText = req.responseText; } } req.open("GET", 'ToDo.txt', true); req.send(null); } function init() { refresh() var int = self.setInterval(function () { refresh() }, 10000); } </script> </head> <body onload="init()"> <div id="main"> <div id="updateMe"> <h2>To-Do List</h2> <h1 id="ToDo"></h1> </div> </div> </body> </html>

Contenido de ToDo.txt

Purchase Things

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!