alex: this.text?

hallo

bei ´ner combo ein onChange="Funktion(this.value)" ist ja kein problem.
aber wie komme ich an den Text?

<option value="1088608458">Deutschland</option>

this.value => Funktion(this.value) => 1088608458
this.text  => Funktion(this.text)  => Teewurst

schon dunkel ;0)
meiner solarzelle fürs hirn reicht offenbar die 60 watt lampe nicht aus.

entschuldigt also diese rookie frage, habe aber leider auch keine nützlichen hinweise gefunden.

mit option[i].text sollte es ja auch funktionieren.
tut es aber nicht.

  1. Hallo!

    hallo

    bei ´ner combo ein onChange="Funktion(this.value)" ist ja kein problem.
    aber wie komme ich an den Text?

    Schau dir mal das options Objekt an.

    mfg
      frafu

    1. Hallo!

      hallo

      bei ´ner combo ein onChange="Funktion(this.value)" ist ja kein problem.
      aber wie komme ich an den Text?

      Schau dir mal das options Objekt an.

      mfg
        frafu

      hatte ich mir schon angesehen.
      hab einfach noch ein licht angemacht.

      jetzt ists schön hell ..
      naja, trotzdem danke für die schnelle antwort.

      problem war:

      STATT:
      var von = document.forms[1].feld[y].text;

      HATTE ICH ES SO:
      var von = document.forms[1].feld.option[y].text;