hwg-languages archives | Sep 2000 | new search | results | previous | next |
Re: simple SPAN Questionby Peter-Paul Koch <ppk(at)xs4all.nl> |
|
><SPAN id="aTag"> Text goes here </SPAN> >...... > ><script language="Javascript"> > alert(document.aTag.value) ></script> > >How could I get that alert to return me "Text goes here"? NN4: you can't (unless you give the SPAN a position: absolute, which kind of defeats the purpose of the tag) IE4/5: document.all['aTag'].innerText NN6 (and IE5 too): document.getElementById('aTag').childNodes[0].nodeValue (assuming there's *only* text inside the SPAN). ppk
HWG: hwg-languages mailing list archives, maintained by Webmasters @ IWA