开发者

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

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜