Open a file browser with default directory in JavaScript and HTML?

If you want to open a file browser in JavaScript and then want to set a default directory same as the file folder, then we cannot do it since windows do not allow you to do so,so it is not possible. For example:

C: :\Amit

This is mainly due to security risk involved to let web code to set any value on the machine.

We can never be assured that even directory exists or not.