<html>
<body>
<script language="JavaScript">
function function1() {
document.all.myTable.moveRow(-1, 2);
}
</script>
<table id="myTable" border="1" cellspacing="5" cellpadding="5">
<tr>
<td>First Row</td>
<td> </td>
</tr>
<tr>
<td>Second Row</td>
<td> </td>
</tr>
<tr>
<td style="background-color:blue">Third Row</td>
<td> </td>
</tr>
<tr>
<td style="background-color:red">Fourth Row</td>
<td> </td>
</tr>
</table>
<button onclick="function1();">Move Row</button>
</body>
</html>
|