Use JavaScript/ActiveX to get list of files

心不动则不痛 提交于 2019-12-11 18:51:54

问题


I've been Googling for hours with no avail...!

How do I use the Scripting.FileSystem object?

In my current case, I want to fill a SELECT element with a list of folders from a particular location. Then, after selecting a folder, I want to display all images found within that folder.

Thanks

P.S. Security is not an issue.


回答1:


You can not use Scripting.FileSystem in web pages because of security reasons. In case you have enough permissions to create such object (HTA or no IE security), it can be used like:

var obj = new ActiveXObject("Scripting.FileSystem");


来源:https://stackoverflow.com/questions/8868519/use-javascript-activex-to-get-list-of-files

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!