请教一个程序!

一声雷响老子闪亮登场 2002-11-13 10:13:12
如何根据BOX里的值给已选定的复选框加标记?!
<%@LANGUAGE="VBSCRIPT"%>
<%
response.buffer=false
response.Expires=0
%>
<% if request.cookies("adminlogin") = "yes" then %>
<!-- #include file="connect.asp" -->
<%
dim del
dim box
del = request.form("Submit")
box = request.form("box")
if del="确定要删除吗?" then '进行删除操作
%>
<%
if request.form("box").count < 1 then
%>
<script language=vbscript>
MsgBox "错误:请选择你要操作的数据!"
location.href = "javascript:history.back()"
</script>
<%
else
for each id in request.form("box")
sql="delete from admin where id="&id
rs.open sql,conn,3,2
next
response.redirect "zhanghao1.asp"

end if
%>

<%
else
sql="select * from admin "
rs.open sql,conn,3,2
%>
<%if request.form("box").count < 1 then%>
<script language=vbscript>
MsgBox "错误:请选择你要操作的数据!"
location.href = "javascript:history.back()"
</script>
<% end if %>
<head>
<LINK href="style.css" rel=stylesheet>
</head>
<body style="margin-top: 0;">
<div align="center">
<table width="85%" border="0" cellspacing="1" bgcolor="#D6DFE7" class="docbutton">

<tr>
<td bgcolor="#D6DFE7" height="30" width="165"> <a href="../index.asp" target="_top"><img src="point.gif" width="13" height="13" border="0" alt="返回首页"></a></td>

<td bgcolor="#D6DFE7" height="30"><div align="right">资料删除</div></td>
</tr>

</table>
</div>
<div align="center">
<table width="85%" border="0" cellspacing="2" cellpadding="1" class="botton">
<form name="form3" method="post" action="zhanghao4.asp">
<tr>
<td bgcolor="#ffffff" width="10%" align="center">选择</td>
<td bgcolor="#ffffff" width="30%" align="center">ID</td>
<td bgcolor="#ffffff" width="30%" align="center">帐号</td>
<td bgcolor="#ffffff" width="30%" align="center">密码</td>
</tr>
<%
i=1
while not rs.eof and i<=rs.pagesize
%>
<tr>
<td bgcolor="#ffffff" width="10%" align="center">
<font size="2">
<input type="checkbox" name="box" value="<%=rs("id")%>">
</font>
</td>
<td bgcolor="#ffffff" width="30%" align="center"><%=rs("id")%></td>
<td bgcolor="#ffffff" width="30%" align="center"><%=rs("name")%></td>
<td bgcolor="#ffffff" width="30%" align="center"><%=rs("password")%></td>
</tr>
<%
i=i+1
rs.MoveNext
wend
%>
<tr>
<td bgcolor="#ffffff" colspan="4" align="center">

<input type="submit" name="Submit" value="确定要删除吗?" class="botton" style="font-size: 9pt; height: 16px; border: 1px #333333 solid; background-color: #D6DFE7" onFocus="this.blur()">
<a href="javascript:history.back()" onFocus="this.blur()"> | 返回 |</a>
</td>
</tr>
</form>
</table>
</div>
<% end if %>
<%else
response.redirect "admin.asp"
end if%>
...全文
22 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
  • 打赏
  • 举报
回复

可怜没人帮!
  • 打赏
  • 举报
回复
帮个忙吧!
kewenfeng 2002-11-13
  • 打赏
  • 举报
回复
头晕了!!!
zykj_2000 2002-11-13
  • 打赏
  • 举报
回复
太长了,赖的看

28,409

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧