前面两位的代码没试成功,我用以下代码搞定了:
hs=1
checkedlist=Request("C")
checkedno=" "&replace(checkedlist,"C","")&","
while not rs.eof
if instr(checkedno," "&cstr(hs)&",")>0 then
rs.delete
end if
hs=hs+1
rs.movenext
wend
dim checkDel,hs
hs=1
checkDel=replace(request.form("checkDel")&" "," ","")
hs=hs+conn.execute "select count(*) from infoTable where id in (0"&checkDel&")"
conn.execute "delete from infoTable where id in (0"&checkDel&")"