1<table border="1" id="tb1">
2<tr><td>aaa</td></tr>
3</table>
1<table border="1" id="tb2">
2<tr><td>bbb</td></tr>
3</table>
1<table border="1" id="tb3">
2<tr><td>ccc</td></tr>
3</table>
1<table border="1" id="tb4">
2<tr><td>ddd</td></tr>
3</table>
将tb1的表移动到tb4下,其他表往上移动。。
---------------------------------------------------------------
1<span id="s">
2<table border="1" id="tb1">
3<tr><td>aaa</td></tr>
4</table>
5<table border="1" id="tb2">
6<tr><td>bbb</td></tr>
7</table>
8<table border="1" id="tb3">
9<tr><td>ccc</td></tr>
10</table>
11<table border="1" id="tb4">
12<tr><td>ddd</td></tr>
13</table>
14</span>
1<input onclick="s.appendChild(s.childNodes[0]);" type="submit"/>
---------------------------------------------------------------
1<table border="1" id="ys">
2<tr>
3<td>1</td><td>1</td>
4</tr>
5<tr>
6<td>2</td><td>2</td>
7</tr>
8<tr>
9<td>3</td><td>3</td>
10</tr>
11</table>
1<input name="ok" onclick="yunshui(ys)" type="button"/>
1<script language="JavaScript">
2function yunshui(id){
3var newTR = id.childNodes[0].childNodes[0].cloneNode(true);
4id.childNodes[0].insertAdjacentElement("beforeEnd",newTR);
5id.childNodes[0].childNodes[0].removeNode(true);
6}
7</script>