我才学,对if elseif endif if 这种语句很迷,请高手根据上边的代码给我分析下 谢谢

来源:百度知道 编辑:UC知道 时间:2024/07/13 06:15:15
<%
if Request("action")="lock" then
conn.execute "update [user] set lock=1 where id="&Request("id")
response.Redirect "user.asp?action=all"
response.End

elseif Request("action")="unlock" then
conn.execute "update [user] set lock=0 where id="&Request("id")
response.Redirect "user.asp?action=all"
response.End

end if
selectbookid=request("userid")
if selectbookid<>"" then
conn.execute "delete from [user] where id in ("&selectbookid&")"
response.Redirect "user.asp?action=all"
response.End
end if
%>
我才学,对if elseif endif if 这种语句很迷,请高手根据上边的代码给我分析下 谢谢

if then

else(else if )

end if

这就是一句了,,, 如果什么成立 怎么样,否则怎么样...

if 条件成立 then
执行内容
elseif(另外个条件成立)
执行内容
else
其他的情况执行
end if (结束)