View Full Version : Retrieve the textual contents of a tag...

Grand Mamamouch
24th November 2004, 01:27 AM
Hello !

Do you know if there is a way to retrieve the textual contents of a tag ?

Example :
<h1 id="h1"><...>textual_contents<...></h1>
Retrieve 'textual_contents'.

'InnerHTML' gives the included tags. 'innerText' seems to do the same thing. However, my Mozilla 1.6 doesn't understand 'innerText'.

24th November 2004, 01:33 AM
depends on the language, you're going to use.. ;)

24th November 2004, 01:51 PM
ok, did notice that you want JavaScript. The 'all' object is part of Microsoft's DHTML and thus many of them are only understood by IE..

have a look at the 'node' object, you should find your answer there

this http://www.howtocreate.co.uk/tutorials/index.php?tut=0&part=25 should get you started