loop and display a stack of images
hi ,
i want to do a program which can display a stack of image. the image name is in order (1.jpg, 2.jpg, 3.jpg, 4.jpg .... 10000.jpg) , i have do the code but it have error. can anyone help me to detect where is the fault ? thanks in advance
===========================================================
<html>
<head>
<title>ViewImage</title>
<script type="text/javascript" src="http://code.jquery.com/jquery-1.7.1.js"></script>
<script>
$(function(){
$.delay(500);
for(var img_num=1;img_num<=1000;img_num++){
$('#hiden-img').attr('src', 'C:/Users/Yue/Desktop/images/'+img_num+'.jpg');
var img = $('#hiden-img');
while(img[0].complete!=true);
$('#real-image').attr('src', img.attr('src'));
$.delay(500);
}});
</script>
</head>
<body>
<img id="hiden-img" style="display:none;"/>
<img id="real-image" src="C:/Users/Yue/Desktop/images/0.jpg"/>
</body>
</html>
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Tags for this Thread
Posting Permissions
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
Forum Rules
Bookmarks