[Javascript] DOM navigation

Paul Cowan dagda1 at hotmail.com
Wed Jun 2 11:48:23 CDT 2004


Hi,

I have a DIV which contains a table, which contains a row, which contains a 
column.

<div id='myDiv'>
    <table>
         <tbody>
              <tr>
                   <td>

Is there a better way of selecting this using the DOM other than saying:

o = 
document.getElementById('myDiv')firstChild.firstChild.firstChild.firstChild;

Thanks

Paul





More information about the Javascript mailing list