<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
<script language="javascript">
    function delRow(tid,rowIndexindex)
    {
        if (tid!=null)
            {
                document.all[tid].deleteRow(rowIndexindex);    
            }
        else
            {
                return;
            }
    }
</script>
</head><body>
<table width="500" border="1" align="center" cellpadding="0" cellspacing="0"  id =row0>
  <tr id ="row1">
    <td bgcolor="#003399" onclick="delRow('row0',this.parentElement.rowIndex)">&nbsp;</td>
    <td bgcolor="#003399">&nbsp;</td>
  </tr>
  <tr>
    <td bgcolor="#FF0000" onclick="delRow('row0',this.parentElement.rowIndex)">&nbsp;</td>
    <td bgcolor="#FF0000">&nbsp;</td>
  </tr>
  <tr>
    <td bgcolor="#00FF00" onclick="delRow('row0',this.parentElement.rowIndex)">&nbsp;</td>
    <td bgcolor="#00FF00">&nbsp;</td>
  </tr>
  <tr >
    <td bgcolor="#669900" onclick="delRow('row0',this.parentElement.rowIndex)">&nbsp;</td>
    <td bgcolor="#669900">&nbsp;</td>
  </tr>
  <tr >
    <td bgcolor="#330000" onclick="delRow('row0',this.parentElement.rowIndex)">&nbsp;</td>
    <td bgcolor="#330000">&nbsp;</td>
  </tr>
</table>
<div align="center">
  <input type="submit" name="Submit" value="保存当前状态" />
</div>
</body>
</html>如上代码中,删除表格,假如现在我删除了两行,剩下的就只有三行了,现在重新刷新页面后又会恢复到原来状态了,现在我想如果删除两行的话,点保存,只保存最后一次剩下的三行的状态,下次打开页面后还是只有三行的。请问这代码怎样写???(保存到服务器,用数据库或者XML保存都可以)
此问题我已经问过了,但却得到的答案都是XML保存几个字比较多,我希望的有人帮我写出来。