javascript - How to list all files in folder? -
so have page i'm working on , have directory named 'products' in same directory index.html is. i'm trying create script count jpg files in 'products' folder , create img element each of those. ideas of how can this?
this can done in server environment or using simulates server environment on local computer, mamp/wamp or node. javascript cannot access local folder contents in manner. can , insert local content images, videos, or javascript/css files, that's limit of can do.
this security reasons. imagine opening else's javascript file on computer , runs script erase files in c drive.
Comments
Post a Comment