/    Sign up×
Community /Pin to ProfileBookmark

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>

to post a comment
HTML

0Be the first to comment 😎

×

Success!

Help @yue826 spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.19,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...