<html><head><title>Test</title>
<script type="text/javascript">
<!--
function Farbe(R, G, B) 
{
   this.R = R;
   this.G = G;
   this.B = B;
   this.hex="#";
}

function HintergrundWechseln() 
{
      var Hintergrund = new Farbe("FF","55","00");
      document.bgColor = Hintergrund.hex + Hintergrund.R + Hintergrund.G + Hintergrund.B;    
}
//-->
</script>
</head><body bgcolor="#FFFFFF">
<h1>Das eigene Farb-Objekt mit JavaScript</h1>
<a href="javascript:HintergrundWechseln()"><b>Hintergrundfarbe wechseln</b></a>
</body>
</html>