怎么可以在每条数据的前一个复选框中选择自己需要的一条或多条
然后用提交按钮发送到另一个页面上并且在重复列表格中显示出来前一页中选择过的指定数据??
具体代码在下面,请各位下载来看看。我该怎么在下面代码中怎么做呢??
<%@LANGUAGE="javascript"%>
<!--#include file="Connections/wy.asp" -->
<%
var zb = Server.CreateObject("ADODB.Recordset"
;
zb.ActiveConnection = MM_wy_STRING;
zb.Source = "SELECT * FROM dbo.zb";
zb.CursorType = 0;
zb.CursorLocation = 2;
zb.LockType = 1;
zb.Open();
var zb_numRows = 0;
%>
<%
var Repeat1__numRows = 10;
var Repeat1__index = 0;
zb_numRows += Repeat1__numRows;
%>
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="includes/echoice_bbs.css">
</head>
<SCRIPT language=javascript>
function SetChecked(val) {
dml=document.form1;
len = dml.elements.length;
var i=0;
for( i=0 ; i<len ; i++) {
if (dml.elements.name=='del') {
dml.elements.checked=val;
}
}
}
</SCRIPT>
<body bgcolor="#dbdbdb">
<br>
<table width="95%" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<td>
<form method="post" action="print.asp" name="form1" >
<table width="100%" border="0" cellspacing="1" cellpadding="2" align="center">
<tr bgcolor="#666699">
<td bgcolor="#666699" width="6%"><div align="center"><font color="#FFFF00">显示</font></div> </td>
<td bgcolor="#666699" width="14%"><div align="center">地址</div></td>
<td width="18%"> </td>
<td width="32%">
<div align="center"><font color="#FFFF00">题目</font></div>
</td>
<td width="13%" bgcolor="#666699">
<div align="center"><font color="#FFFF00">发送者</font></div>
</td>
<td width="17%">
<div align="center"><font color="#FFFF00">发送日期</font></div>
</td>
</tr>
<% while ((Repeat1__numRows-- != 0) && (!zb.EOF)) { %>
<tr bgcolor="#f7f7f7">
<td>
<div align="center">
<input <%=(((zb.Fields.Item("z_id"
.value) == "checkbox"
?"checked":""
%> name="del" type="checkbox" id="del" value="checkbox">
</div></td>
<td><%=(zb.Fields.Item("address"
.value)%></td>
<td bgcolor="#f7f7f7"> </td>
<td bgcolor="#f7f7f7"><div align="center"><%=(zb.Fields.Item("fwneirong"
.value)%></div></td>
<td>
<div align="center"></div></td>
<td align="center"><%=(zb.Fields.Item("bxtime"
.value)%></td>
</tr>
<%
Repeat1__index++;
zb.MoveNext();
}
%>
</table>
<p align="right">
<input type="submit" name="Submit" value="显示所选的" class="buttonface">
<input type=button value="选择所有" onClick="SetChecked(1)" name="button" class="buttonface">
<input type=button value="取消所有" onClick="SetChecked(0)" name="button2" class="buttonface">
</p>
</form>
</td>
</tr>
</table>
<p> </p>
<p> </p>
<div align="CENTER">
<p> </p>
</div>
<p> </p>
</body>
</html>
<%
zb.Close();
%>