动漫头像女生可爱猫耳:怎么修改这个ASP投票系统。复选的时候锁定在10项目?
来源:百度文库 编辑:查人人中国名人网 时间:2024/08/28 07:32:22
怎么修改这个ASP投票系统。复选的时候锁定在10项目?
<!-- #include file="conn.asp"-->
<%
on error resume next
dim id,rs,v,chk,vv,vvv
id=request.form("id")
v=request.form("v")
chk=request.form("chk")
idd=request.form("idd")
if session(idd)=idd then
end if
if id<>"" and v<>"" and idd<>"" then
select case chk
case "1" '单选
conn.execute("update V_vote set vcount=vcount+1 where id=cint('"&v&"')")
case "2" '多选
vvv=replace(v," ","")
vv=split(vvv,",")
for i= 0 to ubound(vv)
conn.execute("update V_vote set vcount=vcount+1 where id=cint('"&vv(i)&"')")
next
end select
session(idd)=idd
response.write "<script>alert('投票成功');history.back();</script>"
response.end
else
response.write "<script>alert('请仔细阅读投票注意事项);history.back();</script>"
response.end
end if
%>
就是当选上复选的时候。必须<>10 少于或者多余10项的时候都有错误提示“请仔细阅读投票注意事项”!谢谢。
<!-- #include file="conn.asp"-->
<%
on error resume next
dim id,rs,v,chk,vv,vvv
id=request.form("id")
v=request.form("v")
chk=request.form("chk")
idd=request.form("idd")
if session(idd)=idd then
end if
if id<>"" and v<>"" and idd<>"" then
select case chk
case "1" '单选
conn.execute("update V_vote set vcount=vcount+1 where id=cint('"&v&"')")
case "2" '多选
vvv=replace(v," ","")
vv=split(vvv,",")
for i= 0 to ubound(vv)
conn.execute("update V_vote set vcount=vcount+1 where id=cint('"&vv(i)&"')")
next
end select
session(idd)=idd
response.write "<script>alert('投票成功');history.back();</script>"
response.end
else
response.write "<script>alert('请仔细阅读投票注意事项);history.back();</script>"
response.end
end if
%>
就是当选上复选的时候。必须<>10 少于或者多余10项的时候都有错误提示“请仔细阅读投票注意事项”!谢谢。
把
response.write "<script>alert('请仔细阅读投票注意事项);history.back();</script>"
汉字改成“投票成功”就不会报那个错了。。。
lol