大家好,我是新来的,想请教大家一个问题 怎么样在复选框中选择我所需要的那条信息,在另一个页面也就是print.asp上显示出来 可以选择一条也可以选择多条,谢谢
具体代码如下大家能帮我看看吗?? <%@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[i].name=='del') { dml.elements[i].checked=val; } } } </SCRIPT> <body bgcolor="#dbdbdb"> <br> <table width="95%" border="0" cellspacing="0" cellpadding="0" align="center"> <tr> <td> <form action="print.asp" method="post" name="form1" id="form1" > <table width="100%" border="0" cellspacing="1" cellpadding="2" align="center"> <tr bgcolor="#666699"> <td bgcolor="#666699" width="5%"><div align="center"><font color="#FFFF00">显示</font></div> </td> <td bgcolor="#666699" width="13%"> </td> <td width="24%"> </td> <td width="24%"> <div align="center"></div> </td> <td width="13%" bgcolor="#666699"> <div align="center"><font color="#FFFF00">发送者</font></div> </td> <td width="21%"> <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) == (zb.Fields.Item("z_id").Value))?"checked":"")%> name="del" type="checkbox" id="del" value="<%= (zb.Fields.Item("z_id").Value) %>" > </div></td> <td><div align="center"></div></td> <td bgcolor="#f7f7f7"><div align="center"><%=(zb.Fields.Item("bxname").Value)%></div></td> <td bgcolor="#f7f7f7"><div align="center"><%=(zb.Fields.Item("address").Value)%></div></td> <td> <div align="center"><%=(zb.Fields.Item("jdmen").Value)%></div></td> <td align="center"><%=(zb.Fields.Item("tel").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(); %> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=gb2312"> <title>无标题文档</title> </head>
<body>
</body> </html>