How to check whether a directory or folder exists or not using javascript or jquery?
You can't. If Javascript had access to the file system (either client or server), it would be a security hole.
Do you mean Javascript running in the browser and checking a directory in the user's machine? If so, you'll have a very hard time doing this, as the browser is isolated from the computer's file system for security reasons.
It can't be done.
Good thing too -- if it could be done, there would be any number of malicious hackers using it to find out what software you've got installed, etc. (occasionally the hackers to manage to find a way through the sandbox and do manage to get at the file system, but these holes generally get closed by the browser vendors very quickly)
JavaScript cannot access the local filesystem.
精彩评论