Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

114
Visualizações
How to read local text file using FileReader WITHOUT the input

I am trying to make a webpage where the page would refresh every second or so new and updated data can be displayed on it.

What I want the code to do is it would read a text file from my PC using its directory automatically, and the tutorials I have researched all show the need of using input, is there any other way to do this where it would just instead need or read from a file directory?

My code so far:

html:

<!DOCTYPE html>
<html>
    <head>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-bandwith, initial-scale=1.0">
        <meta http-equiv="X-UA-Compatible" content="ie=edge"> 
        <meta http-equiv="refresh" content="1"> 
        <title>IOT WEATHER STATION</title>
    </head>
    <body id = 'body'>
        <div style="display:inline-block;vertical-align:top;">
            <img src="sinewaves.png" alt="graph">
        </div>
        <div style="display:inline-block;">
            <script src = "script.js"></script>
 
        </div>

    </body>
</html>

Javascript:

const reader = new FileReader()
reader.onload = function(){
    console.log(reader.result)
}
reader.readAsText('testing.csv')
console.log("TEST")
about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda