I tried to make a slideshow on the home page of my system, but it is giving error, because nothing happens.
JavaScript:
{
satual=1;
smax=3;
stmp=3000;
function troca(){
document.getById("e1").style.visibility="hidden";
document.getById("e2").style.visibility="hidden";
document.getById("e3").style.visibility="hidden";
document.getById("e"+satual).style.visibility="visible";
satual=satual+1;
if(satual>smax){
satual=1;
}
}
function slider(){
document.getById("e1").style.visibility="hidden";
document.getById("e2").style.visibility="hidden";
document.getById("e3").style.visibility="visible";
sLiderTimer=setInterval(troca,stmp);
}
}
HTML:
<html>
<meta charset="utf-8">
<head>
<title>Controla</title>
<link rel="stylesheet" type="text/css" href="index.css">
<link href="https://fonts.googleapis.com/css?family=Lobster" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Fjalla+One" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Raleway" rel="stylesheet">
<script src="script.js"></script>
</head>
<body onload="slider()">
<div class="small"></div>
<div class="medium"></div>
<div class="large"></div>
<header id="cabecalho">
<div class="interface">
<img id="Logo" src="imagens/controla.png" style="width:350px; height:355px; margin-left: 51%;">
</div>
</header>
<div class="menu">
<ul>
<li><a href="index.php">Página Inicial</a></li>
<li><a href="login.php">Login</a></li>
<li><a href="Cadastro.php">Cadastrar</a></li>
<li><a href="#">Minha Conta</a></li>
</ul>
</div>
<section id="banner">
<div id="slider">
<img id="e1" src="imagens/estoque.jpg">
<img id="e2" src="imagens/estoque1.jpg">
<img id="e3" src="imagens/estoque2.jpg">
</div>
</section>