Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

184
Vistas
How to read online file line by line?

I'm sorry for this very basic question, but I can't find it out. Basically I'm trying to read this file line-by-line, then in another HTML page whenever there is a string that match one of these lines, then it will be wrapped within the <span class="hello">...</span> tag. For the latter I can use the findAndReplaceDOMText library, and I thought that the former should be easy too. But I can only find answers to read an uploaded file. That is, using

<input type="file" name="file" id="file">

to upload it. For example: How to use Javascript to read local text file and read line by line?, Reading line-by-line file in JavaScript on client side. Googling js read line by line only returns results for Node.js

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

You can use the Fetch API and read the response as text and iterate line by line

(async () => {
  const response = await fetch("https://xn--qucu-hr5aza.cc/files/M%E1%BB%99t%20h%E1%BB%87%20th%E1%BB%91ng%20ni%E1%BB%81m%20tin/Node%20list");
  const data = await response.text();
  const lines = data.split("\n");
  console.log(lines)
})();
about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda