<!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)"> </td>
<td bgcolor="#003399"> </td>
</tr>
<tr>
<td bgcolor="#FF0000" onclick="delRow('row0',this.parentElement.rowIndex)"> </td>
<td bgcolor="#FF0000"> </td>
</tr>
<tr>
<td bgcolor="#00FF00" onclick="delRow('row0',this.parentElement.rowIndex)"> </td>
<td bgcolor="#00FF00"> </td>
</tr>
<tr >
<td bgcolor="#669900" onclick="delRow('row0',this.parentElement.rowIndex)"> </td>
<td bgcolor="#669900"> </td>
</tr>
<tr >
<td bgcolor="#330000" onclick="delRow('row0',this.parentElement.rowIndex)"> </td>
<td bgcolor="#330000"> </td>
</tr>
</table>
<div align="center">
<input type="submit" name="Submit" value="保存当前状态" />
</div>
</body>
</html>如上代码中,删除表格,假如现在我删除了两行,剩下的就只有三行了,现在重新刷新页面后又会恢复到原来状态了,现在我想如果删除两行的话,点保存,只保存最后一次剩下的三行的状态,下次打开页面后还是只有三行的。请问这代码怎样写???(保存到服务器,用数据库或者XML保存都可以)
此问题我已经问过了,但却得到的答案都是XML保存几个字比较多,我希望的有人帮我写出来。
<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)"> </td>
<td bgcolor="#003399"> </td>
</tr>
<tr>
<td bgcolor="#FF0000" onclick="delRow('row0',this.parentElement.rowIndex)"> </td>
<td bgcolor="#FF0000"> </td>
</tr>
<tr>
<td bgcolor="#00FF00" onclick="delRow('row0',this.parentElement.rowIndex)"> </td>
<td bgcolor="#00FF00"> </td>
</tr>
<tr >
<td bgcolor="#669900" onclick="delRow('row0',this.parentElement.rowIndex)"> </td>
<td bgcolor="#669900"> </td>
</tr>
<tr >
<td bgcolor="#330000" onclick="delRow('row0',this.parentElement.rowIndex)"> </td>
<td bgcolor="#330000"> </td>
</tr>
</table>
<div align="center">
<input type="submit" name="Submit" value="保存当前状态" />
</div>
</body>
</html>如上代码中,删除表格,假如现在我删除了两行,剩下的就只有三行了,现在重新刷新页面后又会恢复到原来状态了,现在我想如果删除两行的话,点保存,只保存最后一次剩下的三行的状态,下次打开页面后还是只有三行的。请问这代码怎样写???(保存到服务器,用数据库或者XML保存都可以)
此问题我已经问过了,但却得到的答案都是XML保存几个字比较多,我希望的有人帮我写出来。
解决方案 »
- 鼠标离开事件执行不及时怎么办?
- C# WINDOWS服务 通过NET FRAMEWORK2.0连接WEB SERVICE访问数据库,需要依存哪些服务?
- 有什么办法释放WebBrowser打开页面后所占用的内存?
- 关于自定义UserControl的属性
- C#应用程序间传参数
- C#初学者,想找些C#程序源代码。求助。:)
- 一个panel中的控件实现拖拽缩放的问题
- socket只能收到一次数据,第二次就没有反应了。求指导!!
- WebForm 中如何在DataGrid中选中一行,并获得此纪录?谢谢!
- datagridview 数据源来自多个表 应该怎么更新?
- 关于Datalist绑定列
- 我想问一下关于Security Application Block 的问题
1。刷新以后把删除过程用JS模拟一遍
2。刷新后直接构建目标表格推荐后一种