// focus wird auf ein Element gesetzt
while(focus) {
elemPath[arrayPointer] = focus;
arrayPointer++;
elemPath = "/"+focus.tagName+elemPath
focus = focus.parentNode;
}
alert(elemPath);Komischer Weise sieht die Ausgabe so aus:
/undefined/HTML/BODY/DIV/DIV/DIV/DIV/FORM/DIV/INPUT
Wieso komischerweise?
einmal ist elemPath ein Array und dann ein String.
Struppi.