Looking for assistance with changing images every 10 seconds in JavaScript.
Here are the HTML and CSS codes, I just need help adding some JavaScript to make it work:
HTML
<body onload = "imageChanger()">
<div>
<ul>
<li><img src = "images/img1.jpg"/></li>
<li><img src = "images/img2.jpg"/></li>
<li><img src = "images/img3.jpg"/></li>
<li><img src = "images/img4.jpg"/></li>
</ul>
</div>
</body>
CSS
div {margin: 50px auto; height: 500px; width: 800px; overflow: hidden; border: 10px solid;}
img {width: 800px; height: 500px;}
ul {list-style-type: none; padding: 0; margin: 0;}
I need help adding code to change the image on page load:
JS
function imageChanger()
{
//Your code goes here
}