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

282
Visualizações
how to read file using javascript without using node.js?

the thing i want to do is to get the file's value like when you copy the input of the file using javascript but what if you choose a random file and get it's input using javascript?

i searched and this is what i found.

node.js file:

var http = require('http');
var fs = require('fs');
http.createServer(function (req, res) {
  fs.readFile('demofile1.html', function(err, data) {
    res.writeHead(200, {'Content-Type': 'text/html'});
    res.write(data);
    return res.end();
  });
}).listen(8080);

in demofile.html:

<html>
<body>
<h1>My Header</h1>
<p>My paragraph.</p>
</body>
</html>

but this is not what i am looking for and this is complex for me.

this iw what i mean by how to read file using js?:

{in file.html}: <075></075>

{in scripts}: {let file = file("file.html"); if (file.includes("<!doctype>"): {console.log("no errors")} else {console.log("error found"}}

about 4 years ago · Santiago Gelvez
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