通过javascript计算文件夹中的文件数 [英] Count number of files in a folder through javascript
本文介绍了通过javascript计算文件夹中的文件数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有没有的文件夹。的HTML文件。我可以算不上吗?使用javascript的文件?请帮助
I have folder in which there are no. of html files. Can i count the no. of files using javascript? Please help
谢谢
推荐答案
不,这是不可能的仅限JavaScript。
No, this is not possible using JavaScript only.
您可以对页面进行Ajax调用,从服务器端代码中可以找到文件夹中的文件数,然后将结果返回给回调函数。
You can make an Ajax call to a page and from the server side code you can find the number of files in a folder and then return the result to the callback function.
我假设这些文件不在客户机中。
I assume the files are in not in the client machine.
这篇关于通过javascript计算文件夹中的文件数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文