table的moveRow功能

来源:互联网 发布:汤浦童装淘宝店 编辑:程序博客网 时间:2024/05/16 08:25

table的moveRow功能

使用moveRow可以进行换行
 
<table id="test" width="100">
<tr><td>1</td><td bgcolor="red">red</td>
</tr>
<tr><td>2</td><td bgcolor="blue">blue</td>
</tr>
</table>
<input type="button" value="换行" onclick="moveRow(1,0)">
<script type="text/javascript">
function moveRow(r_1,r_2){
var tableID=document.getElementById("test");
tableID.moveRow(r_1,r_2);
}
setInterval('moveRow(1,0)',1000);
</script> 
http://infowe.com/dom/dom10/methods/moverow.html