日期:2014-05-17 浏览次数:20508 次
<script type="text/javascript">
$(function () {
$("#delete").live("click",function () { //单击时执行删除操作,通过更改action属 性并提交表单来和后台交互
var $id = $(this).attr("deleteid");
$("#form1").attr("action", "ReaderBorrowHistory.aspx?cid=" + $id);
$("#form1").submit();
});
});
</script>
<body>
<form id="form1" method="post" action="ReaderBorrowHistory.aspx">
<div>
<table id="Table1" style="font-family:Tahoma; font-size:12px; border-collapse:collapse ;" align="center" bgcolor="#f1f0f4" border="0" width="398">
<tr>
<td align ="center" >
<h1><font face ="GB_2312">借阅记录</font></h1>
<hr width ="90%" />
</td>
</tr>
<tr>
<td align ="center">
<%=outputTable %> <!-- outputtable是在后台定义的公共变量 用于放置动态拼接出的一个table -->
</td>
</tr>
</table>
</div>
</form>
</body>
public partial class Reader_ReaderBorrowHistory : System.Web.UI.Page
{
public string outputTable;
protected void Page_Load(object sender, EventArgs e)
{
StringBuilder sText = new StringBuilder();
sText.Append("<table id='table2'><tr><td>");
sText.Append("选择</td><td>");
sText.Append("题名/作者</td><td>出版信息</td>");
sText.Append("<td>借阅时间</td><td>应还时间</td></tr>");
Borrow borrow = new Bo