i want t get the number of files in a folder. there are many images in my folder i want to count there numbers is there any way to do that using jquery or javascript ? Thanks in advance
相关问题
- Is there a limit to how many levels you can nest i
- How to toggle on Order in ReactJS
- How to fix IE ClearType + jQuery opacity problem i
- void before promise syntax
- jQuery add and remove delay
I didn't tried yet, but could be like this.
JavaScript is client side language. it not allowed to access file to server, if you are using ASP.net then use below line of code for get count of file.
If the server is Apache and Directory Listing is allowed, and you AJAX' a directory, Apache will typically return a document with a
<table>
containing the files in the directory if there is no index files present. You can extract the<table>
from the document and show it, or count the number of rows in the table containing file information. I would consider any row in that table having a size column with value 0 or higher as a file.markup :
ajax: