仅使用javascript列出目录中的文件 [英] List files in a directory using only javascript
本文介绍了仅使用javascript列出目录中的文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
是否可以仅使用javascript列出目录中的文件?澄清一下,我的意思是列出服务器上的文件,而不是客户端计算机上的文件。例如:
Is it possible to list the files in a directory using only javascript? To clarify, I mean list the files on the server, not the files on the clients computer. For instance:
www.domain.com/files /
www.domain.com/files/
包含4张图片(.jpg)
contains 4 images (.jpg)
我可以制作一个额外的页面(www.domain.com/files/list.html),使用javascript列出这4个文件吗?
Can I make an extra page (www.domain.com/files/list.html) that lists those 4 files using javascript?
推荐答案
不,Javascript无权访问文件系统。 服务器端Javascript 是一个完全不同的故事,但我猜你并不是故意的。
No, Javascript doesn't have access to the filesystem. Server side Javascript is a whole different story but I guess you don't mean that.
这篇关于仅使用javascript列出目录中的文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文