Hi all i just want to know if we can read a file using javascript
like
what we do
fp=(\"r\",\"path\")
like that is i
Yes, this is possible, even in some browsers.
If the browser supports the new File API, you can read any file the user gives you permission to read via an input[type=file]
element. Specification | Example here on StackOverflow
This can be done on all major browsers using "ajax", more specifically the XMLHttpRequest object. It's made a lot easier by libraries like jQuery, Prototype, YUI, Closure, or any of several others.
You'll need an environment that provides file reading, such as NodeJS.