TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Ankit Kumar
NA
159
48.6k
Problem with slideshow in javascript
Feb 26 2016 6:01 AM
hi all,
Please help me as soon as possible.
i am trying to put some images in array and wanna start slideshow through loop but i am not getting it done.
below is my code.
<html>
<head>
<script>
var myImage = document.getElementById("myimages");
var imageArray = ["images/image1.jpg","images/image2.png","images/image3.png","images/image4.jpg"];
var imageIndex = 0;
function changeImage()
{
for(var i=0;i<4;i++)
{
myImage.src=imageArray[0].src;
if(i==imageArray.length)
{
i=0;
}
myImage.src=imageArray[i].src;
}
}
}
</script>
</head>
<body onload="changeImage();">
<center><img src="images\image1.jpg" style="height:400px; width:400px;" id="myimages"/></center>
</body>
</html>
Reply
Answers (
1
)
Intel XDK Project..
how to validate asp:dropdown list using javascript.