| 发表于:2007-01-19 17:34:453楼 得分:0 |
用table的rows,cells也行 <body onload=aa()> <table id= "mytable "> <tr> <td> <table id= "firsthalf "> 1 </table> </td> <div> <table id= "secondhalf "> 2 </table> </div> <td> </td> </tr> </table> </body> <script> function aa() { var mytable = document.getelementbyid( "mytable "); alert(mytable.rows[0].cells[0].childnodes[0].id) } </script> | | |
|