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

Popular posts from this blog

sublimetext3 - what keyboard shortcut is to comment/uncomment for this script tag in sublime -

java - No use of nillable="0" in SOAP Webservice -

ubuntu - Laravel 5.2 quickstart guide gives Not Found Error -