Re: [Javascript] div tag füllen

Paul Novitski paul at juniperwebcraft.com
Thu Jul 27 10:11:25 CDT 2006


At 06:26 AM 7/27/2006, Michael Borchers wrote:
>ich habe einen <div id="test">,
>ein neuer inhalt kommt aus httpRequest.responseText.
>
>nun versuche ich den div zu füllen:
>document.getElementById('test').value = httpRequest.responseText;
>
>der responseText ist auf jeden Fall mit Inhalt gefüllt,
>nur im div will kein Text erscheinen.
>
>Ich vermute value funzt hier nicht?
>wie sonst? da war doch mal was...hm...


Michael,

Ich vermute daß VALUE nicht ein Attribut einer DIV ist.
I suspect that VALUE is not an attribute of DIV.

Stattdessen versuchen Sie diese:
Instead, try these:

.textContent
http://developer.mozilla.org/en/docs/DOM:element.textContent

.innerHTML
http://developer.mozilla.org/en/docs/DOM:element.innerHTML

Sie konnten diesen Artikel nützlich auch finden:
You might also find this article useful:

Traversing an HTML table with JavaScript and DOM Interfaces
(Überqueren einer HTML Tabelle mit Javascript und DOM Schnittstellen)
http://developer.mozilla.org/en/docs/Traversing_an_HTML_table_with_JavaScript_and_DOM_Interfaces

Obwohl er Tabellen bespricht, treffen die 
Grundprinzipien auf andere Elemente zu.
Although it discusses tables, the basic principles apply to other elements.

Paul
(geholfen durch Kindheit Deutsch Klassen und Babel Fische...) 




More information about the Javascript mailing list