技巧一:查看dom节点所具有的属性
实践这个小技巧,就能够高效的解决javascript浏览器的兼容性问题
![](/Images/OutliningIndicators/ExpandedBlockStart.gif)
<body>
<table id="table1" border="1px">
<tbody>
<tr><td>ddd</td><td>ddd</td></tr>
<tr><td>ddd</td><td>ddd</td></tr>
<tr><td>ddd</td><td>ddd</td></tr>
<tr><td>ddd</td><td>ddd</td></tr>
<tr><td>ddd</td><td>ddd</td></tr>
<tr><td>ddd</td><td>ddd</td></tr>
</tbody>
</table>
<script>
for(var sAttr in document.getElementById("table1"))
{
document.write(sAttr + "<br />");
}
</script>
</body>