<table>
<tr id="oDiv" name="oDiv"><td></td><td></td></tr>
</table>
<script>
//alert(this.oDiv);
//this.oDiv-->undefined in firefox
alert(document.all?this.oDiv.children.length:document.getElementById("oDiv").childNodes.length);
</script>
<tr id="oDiv" name="oDiv"><td></td><td></td></tr>
</table>
<script>
//alert(this.oDiv);
//this.oDiv-->undefined in firefox
alert(document.all?this.oDiv.children.length:document.getElementById("oDiv").childNodes.length);
</script>
但也差不多