Re bonjour!

Je commence tout juste avec COM et j'ai un soucis! (comme c'est bizarre!)

Voici mon code:

Script:
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
 
<script language="javascript" type="text/javascript">
 
        function count(){
 
	    var tables = document.getElementsByTagName("table");
            var tr = tables[0].getElementsByTagName("tr");
 
            document.writeln(tables.length);
            document.writeln(tr.length);
 
            document.writeln(tables[0].childNodes.length);
 
        }
    </script>
html:
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
 
<body onload="count()">
    <form>
 
 
        <table>
              <tr>
                <td></td>
              </tr>
              <tr>
                <td></td>
              </tr>
              <tr>
                <td></td>
             </tr>
        </table>
 
    </form>
</body>

Résultat:
document.writeln(tables.length); --> 1
document.writeln(tr.length); --> 3

document.writeln(tables[0].childNodes.length); --> Rien!!!!!!


Pourquoi tables[0].childNodes.length est null?

Help