I am developing a web application that will reside on a kiosk with a folder of images that will periodically be downloaded from a server. I'm having trouble getting the application to load groups of images off the local disk and loop through them开发者_StackOverflow. If there is a way to do this in JavaScript, I would prefer it.
If you have any ideas on how or sample code to get started, I would appreciate the help.
I'm not a web developer so my JavaScript isn't great, code comments and descriptions are appreciated also.
Javascript, from a web browser, is prevented from accessing local drives for security reasons. Your could, however, setup a webserver on the local machine to serve those images, and then load them via Javascript from the webserver.
For example, using jQuery:
$.load('http://localhost/image.jpg', function() {
// do what you need to do with the image
});
精彩评论