开发者

Rotating between images that are dynamicaly loaded from local disk using javascript

开发者 https://www.devze.com 2023-03-21 03:56 出处:网络
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

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
});
0

精彩评论

暂无评论...
验证码 换一张
取 消