Is it possible to get the contents of a dire开发者_JAVA百科ctory with javascript?
Not really because of security reasons. You are trying to access client's file system !!
Note: There is FSO (File System Object) but to my knowledge it only works in IE.
Useful Resources:
http://www.c-point.com/JavaScript/articles/file_access_with_JavaScript.htm
http://4umi.com/web/javascript/fileread.php
No, not with JavaScript that runs within a browser sandbox.
Assuming you mean JavaScript running inside a web browser, then no.
If you are running from somewhere else, (e.g. cscript.exe from a Windows command line, or ASP server side) then yes.
Which scenario are you referring to?
精彩评论