JAVASCRIPT SLIDER : 

<html>
<head>
<style>
#im1
{
height:500px;
width:1200px;
border:20px solid purple;
padding:20px;
box-shadow:0px 0px 5px 1px black inset;
border-radius:20px;
}
</style>
<script>
var arr=["hero-1.jpg","a.jpg","hero-2.jpg","hero-3.jpg"];
var i=0;
function slider()
{
var img1=document.getElementById("im1");
img1.src="images/"+arr[i];
i++;
if(i==arr.length)
i=0;
}
window.setInterval("slider()",1000);
</script>
</head>
<body>
<center>
<h1>SLIDER</h1>
<hr/>
<img src="images/a.jpg" id="im1" />
</center>
</body>
</html>

 


Javascript Slider