Andy: Variablen

Hi,

wie kann ich diese Zeile hier so umschreiben, dass es allgemeingültig ist, also dass statt der Zahl eine Variable steht?

document.form.C1.value;

Andy

  1. Hallo Andy,

    wie kann ich diese Zeile hier so umschreiben, dass es allgemeingültig ist, also dass statt der Zahl eine Variable steht?

    document.form.C1.value;

    document.forms["formularname"].elements["c" + i].value
    oder kürzer
    document.formularname.elements["c" + i].value

    Grüße
    Andreas

    --
    "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning."
    (Rich Cook)