我来回答
共2个回答
热心网友
复选框的值提交过来的值 接收到的会是 1,2,3,4 这样的.
allid = request.form("id")
SQL语句 delete from tablename where id in (allid)
根据情况ALLID要用"&分隔.
热心网友
DW好像没有这功能 ,要用程序来做,可以用 表单+PHP或ASP、JSP等
<form name=sel_form action=?mod=del' method=post>
<input type=checkbox name=sel_all value='yes' onClick="javascript:select_all(this.form);">
每一条后面加
<input type=checkbox name=sel_id value='<%=rs("cid")%>'>
<select name=sel_type size=1>
<option value='删除'>删除</option></select><input type=submit value='操作' onClick="return sel_click(this.form);" id=submit1 name=submit1>
</form>
<%
sel_id=trim(Request.Form("sel_id"))
sel_type=trim(Request.Form("sel_type"))
select case sel_type
case "推荐"
case "删除"
if instr(sel_id,",")>0 then
myid=split(sel_id,",")
for i=0 to ubound(myid)
conn.execute("delete * from tb_product where cid="&csng(myid(i)))
mynum=ubound(myid)+1
else
conn.execute("delete * from product where cid="&csng(sel_id))
mynum=1
end if
msgstr="已成功(删除)操作了"&mynum&"条!"
end select
%>