Kód:
<html>
<head>
<script>
farby= new Array ("blue","red","green");
function modra() {
object1.innerHTML="<font color="+farby[0]+"></"+"font>";
}
function cervena() {
object1.innerHTML="<font color="+farby[1]+"></"+"font>";
}
function zelena() {
object1.innerHTML="<font color="+farby[2]+"></"+"font>";
}
</script>
</head>
<body>
</body>
<input type="button" Value="modra" OnClick="modra();">
<input type="button" Value="zelena" OnClick="zelena();">
<input type="button" Value="cervena" OnClick="cervena();">
<DIV id="object1"></DIV>
</html>
ehm nieco taketo to si to chcel??? samozrjeme buttony si zmen na gulicky