<%
'这里是用于判断密码输入的
if Request.Form("txtPass")="admin" then
'记录Session
Session("login")="admin"
end if
%>
<%
'这里是用于清除密码的
if Request.QueryString("clear")<>"" then
Session("login")=""
end if
%>
<html>
<head>
<title>示例页面</title>
</head>
<body>
<%
'判断Session是否存在
if Session("login")<>"admin" then
%>
<!--登陆表单开始-->
<form name="form1" action="pass.asp" method="post">
请输入密码:<input type="password" name="txtPass"/>
<input type="submit" value="登陆" />
</form>
<%else%>
<!--这里是你想显示的网页内容-->
恭喜你,<%=Session("login")%> !成功登陆啦! <a href="pass.asp?clear=yes">重新登陆</a>
<%end if%>
</body>
</html>
'这里是用于判断密码输入的
if Request.Form("txtPass")="admin" then
'记录Session
Session("login")="admin"
end if
%>
<%
'这里是用于清除密码的
if Request.QueryString("clear")<>"" then
Session("login")=""
end if
%>
<html>
<head>
<title>示例页面</title>
</head>
<body>
<%
'判断Session是否存在
if Session("login")<>"admin" then
%>
<!--登陆表单开始-->
<form name="form1" action="pass.asp" method="post">
请输入密码:<input type="password" name="txtPass"/>
<input type="submit" value="登陆" />
</form>
<%else%>
<!--这里是你想显示的网页内容-->
恭喜你,<%=Session("login")%> !成功登陆啦! <a href="pass.asp?clear=yes">重新登陆</a>
<%end if%>
</body>
</html>
浙公网安备 33010602011771号