...

View Full Version : Reading text nodes.



TomB
03-19-2006, 12:17 AM
How can I read text nodes using DOM?

I have this:



<div id="myDiv">Some text.</div>


How can I get "Some text." using DOM?

Thanks.

jkd
03-19-2006, 01:28 AM
document.getElementById("myDiv").firstChild.nodeValue

TomB
03-19-2006, 01:29 AM
thanks :)



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum