在ASP页面上的表示删除的复选框,点中提交后却未执行删除操作。
.......打开数据库的代码就不写上来了.....html.....>
<%
dim mi
dim gqfla
dim meth
dim chb()
meth=request.QueryString( "meth ")
if (meth= "del ") and request.form( "checkb ") <> " " then
response.write " <script language=javascript> if(!confirm( '你确定要删除吗? ')) "& " history.back(0) </script> "
chb=split(request.form( "checkb "), ", ")
for each box in chb------------------------------这里没有执行到,为何?
response.write "chb的值依次是: "&box
cn.execute "delete * from gqinfo where infoid= "&box
next
elseif (meth= "del ") and (request.form( "checkb ")= " ") then
response.write " <script language=javascript> alert( '请选择要删除的信息行! ');history.back(0) </script> "
end if
mi=request.QueryString( "id ")
sq= "select * from gqinfo where infomaster= ' "&mi& " ' order by date desc,infoid desc "
set rd=cn.execute(sq)
response.write " <form name= 'form1 ' method=post action=masgq.asp?meth=del&id=mi> <table width= '100% '> "
response.write " <tr> <td width= '2% ' height=6> </td> <td width= '19% '> <div align= 'center '> 发布日期 </div> </td> <td width= '15% '> <div align= 'center '> 信息类型 </div> </td> <td width= '48% '> <div align= 'center '> 信息标题 </div> </td> <td width= '16% '> <div align= 'center '> 是否删除 </div> </td> </tr> "
response.write " <TR> <TD background=images/line.gif colSpan=5 height=2> </TD> </TR> "
do while not rd.eof
if rd( "gqflag ")=true then
gqfla= "出售 "
else gqfla= "求购 "
end if
response.write " <tr> <TD> · </TD> <TD> "&rd( "date ")& " </td> <td> <div align= 'center '> [ "&gqfla& "] </div> </td> "
response.write " <td> <A href= 'gqdetail.asp?id= "&rd( "infoid ")& " ' target=_blank> "&rd( "infotitle ")& " </A> </TD> <td> <div align= 'center '> <input type= 'checkbox ' name= 'checkb ' value= "&rd( "infoid ")& "> </div> </td> </TR> "
response.write " <TR> <TD background=images/point.gif colSpan=5 height=2> </TD> </TR> "
rd.movenext
loop
response.write "