alfinete
Power Member
Código:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
<title >imagens</title>
<script type="text/JavaScript">
img =1
function proximo()
{
if (img<4)
{
img++
i ="img/"+img+".jpg"
document.getElementById("imgg").src=""+i+""
}
}
function anterior()
{
if (img!=1)
{
img––
i ="img/"+img+".jpg"
document.getElementById("imgg").src=""+i+""
}
}
</script>
</head>
<body>
<h1>Galeria de Imagens</h1>
<p>Use os botões ou clique nas fotos para ampliar.</p>
<input type="button" value="Anterior" onclick="javasript:anterior();" />
<input type="button" value="Próxima" onclick="javasript:proximo();" /><br /><br />
<img src="img/1.jpg" id="imgg" alt=""/>
<br /><br />
</body>
</html>
para a frente passa bem ,as para traz não sei o que se passa
agradecia um help