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

280
Views
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
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!