Hi tab,
ich nutz gern Jquery:
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<script src="http://code.jquery.com/jquery-1.11.0.min.js"></script>
<script>
$(function(){
var Texte = ["Text1", "Text2", "Text3", "Text4"];
var i = 0;
alert(i);
$('button').click( function(){
i++;
if ( i >= Texte.length ) { window.location="http://www.newlocation.com"; }
$("span").text( Texte[i]);
});
});
</script>
</head>
<body>
<span>Text1</span>
<br>
<button>weiter</button>
</body>
</html>
Viele Grüße aus LA
--
ralphi
ralphi