I have on my web server a JS script that I want to be able to read files. My filesystem is like this:
> Root index.html read.js > files file.txt
What you're looking for is XMLHttpRequest.