a=split(trim(request("checkbox")),",")
for i=0 to ubound(a)
set rs=server.createobject("adodb.recordset")
sql="select * from tourjoy where id="&trim(a(i))
rs.open sql,conn,3,2
if not rs.eof then
rs.delete '删除记录
end if
next
首先你把所有的checkbox的名字都設為一樣的﹐value="<%=rs("id")%>"
然后
id=request("checkbox")
id=split(id,",")
i=ubound(id)
for j=0 to i-1
sqlconn.execute("delete from users where id="&cint(id(j))&"")
next
<!--#include file="conn.asp"-->
<%dim rs
set rs=opentable("select id from users ",sqlconn)
while not rs.eof
if request(rs("id"))="ON" then
sqlconn.execute("delete from users where id='"&rs("id")&"'")
end if
rs.movenext