yms123进来下,帮我看看这段代码,我是根据你的ASP分页修改来的,却没改成功
<[email=%@LANGUAGE=VBScript%]%@LANGUAGE=VBScript%[/email]><!--#include virtual ="/Include/Frequent.asp"-->
<!--#include file="CONDB.inc"-->
<html>
<head>
<meta http-equiv="Content-Type" c>
<meta name="GENERATOR" c>
<meta name="ProgId" c>
<title>Let's begin</title>
<script language="javascript">
function DelSel_Click()
{
var ItemStr="";
ItemStr=getSelItemStr();
if(confirm('确定要删除选中的内容吗?'))
{
if(ItemStr=="")
{
alert('请先选择要删除的内容');
return false;
}
document.SubForm.ItemString.value=ItemStr;
document.SubForm.submit();
}
}
function getSelItemStr()
{
var ItemStr="";
for(var i=0;i<this.SelId.length;i++)
{
if(this.SelId[i].checked)
ItemStr+=this.SelId[i].value+"|";
}
if(ItemStr!="")
ItemStr=ItemStr.substr(0,(ItemStr.length-1));
return ItemStr;
}
function SelAll_Click()
{
for(var i=0;i<this.SelId.length;i++)
{
if(this.SelAll.checked)
this.SelId[i].checked=true;
else
this.SelId[i].checked=false;
}
}
function Page_Load()
{
<%
Dim ItemStr,tSql
IF Request.Form("ItemString")<>"" Then
ItemStr=Request.Form("ItemString")
Response.Write "alert ItemStr;"
ItemStr="ID="&Replace(ItemStr,"|"," Or ID=")
tSql="delete from mtrack1 where autoid="&ItemStr
Response.Write "alert('"&tSql&"');"
conn.Execute tSql
Response.Write "alert('删除成功!');"
End IF
%>
}
</script>
</head>
<body bgcolor="#FFFFFF">
<!--#include file ="Head.htm"-->
<table width="733" border="1" cellspacing="0" cellpadding="0">
<tr>
<td width="111" height="30">
<div align="center"><font color="#3366FF" face="Verdana, Arial, Helvetica,sans-serif"><b><font size="2">ID</font></b></font></div>
</td>
<td width="111" height="30">
<div align="center"><font color="#3366FF" face="Verdana, Arial, Helvetica,sans-serif"><b><font size="2">Barcode</font></b></font></div>
</td>
<td width="111">
<div align="center"><font color="#3366FF" face="Verdana, Arial, Helvetica, sans-serif"><b>XCVR</b></font></div>
</td>
<td width="111">
<div align="center"><font color="#3366FF" face="Verdana, Arial, Helvetica, sans-serif"><b>Product Name<br>
</b></font></div>
</td>
<td width="111">
<div align="center"><font color="#3366FF" face="Verdana, Arial, Helvetica, sans-serif"><b>manager date<br>
</b></font></div>
</td>
<td width="111">
<div align="center"><font color="#3366FF" face="Verdana, Arial, Helvetica, sans-serif"><b>delete what we choose<br>
</b></font></div>
</td>
</tr>
<%
MyAccount = GetAccount()
owner = GetBadge(MyAccount)
mydate = now()
session("owner") = owner
'set conn=server.createobject("adodb.connection")
set rs=server.createobject("adodb.recordset")
'c
'conn.open = constr
rs.open "SELECT * from mtrack1 where owner= '"&owner&"' and loopcant=1", con,1,1
if rs.eof then
Response.Write("<tr> <td colspan='5' height='30'><i>Sorry there is no barcode need you to accept or reject</i></td> </tr>")
Else
Do While NOT rs.EOF
id=Cint(rs("autoid"))
'response.write id
response.write "<tr><td>"&rs("autoid")&"</td><td>"&rs("Barcode")&"</td><td>"&rs("XCVR")&"</td><td>"&rs("product")&"</td><td>"&rs("mydate")&"</td>"%>
<td><input type="checkbox" name="SelId" value=<% =id %>></td></tr>
<%
rs.MoveNext
Loop
rs.Close
Set rs = Nothing
Con.Close
Set Con = Nothing
end if
%>
<tr><td collspan="5"><input type="checkbox" name="SelAll" >
全选</span>
<input type="button" name="DelSel" value="删除选中项" >
</td>
</tr>
</table>
<form name="SubForm" action="delete.asp" method="post" >
<input type="hidden" name="ItemString" >
</form>
<!--#include file ="foot.htm"-->
</body>
</html>
前面窗口的提示都成功的,但是在page_lode()这一块没有成功,没在数据库里删除数据啊,我不知道哪里的问题?