Harry: Funktionen in JS vereinfachen

Beitrag lesen

Seasn

Beispiel:
         document.erg1.src = staron.src;
  document.erg2.src = staroff.src;
  document.erg3.src = staroff.src;
  document.erg4.src = staroff.src;
  document.erg5.src = staroff.src;

for(i=2; i<=5; i++)
    document["erg"+i].src = staroff.src;

Cya,

Harry