开发者

Find "my documents" path with javascript

开发者 https://www.devze.com 2023-03-15 23:12 出处:网络
I would like to determine the path of \"my documents\" folder with Javascript. I ne开发者_高级运维ed it to specify the folder where I could store the logs of my application.

I would like to determine the path of "my documents" folder with Javascript. I ne开发者_高级运维ed it to specify the folder where I could store the logs of my application.

Thanks


Use the SpecialFolders-method of the shell:

shell = new ActiveXObject("WScript.Shell");
pathToMyDocuments = shell.SpecialFolders('MyDocuments');

http://msdn.microsoft.com/en-us/library/0ea7b5xe%28v=vs.85%29.aspx


You can't access client file system with Javascript for obvious security reasons.

0

精彩评论

暂无评论...
验证码 换一张
取 消