code:
<html>
<body>
<div>1</div>
<div>2</div>
<div>3</div>
<div>4</div>
<script language="Javascript">
var x = document.getElementsByTagName("div");
for (i=0;i<x.length;i++)
{
document.write(x[i].text.nodeValue);
}
</script>
</body>
</html>
This should make a page that looks like
1
2
3
4
1234
but all i get is
1
2
3
4
i am using firefox 2.0.0.4, what's wrong?