5_2b.asp

来自「《asp网页设计》作者沈才梁源代码,共十章」· ASP 代码 · 共 21 行

ASP
21
字号
<%
Option Explicit
Dim SName,SPass 
SName=Trim(Request("UserName"))	'接收用户名文本框的内容,UserName为文本框的名称
SPass=Trim(Request("Password"))	'接收密码文本框的内容,Password为密码框的名称
If SName="" then
  Response.Write "对不起,用户名不能为空!<a href='JavaScript:history.go(-1);'>返回</a>"
  Response.End
End If
If Spass="" then
  Response.Write "对不起,密码不能为空!<a href='JavaScript:history.go(-1);'>返回</a>"
  Response.End
End If
If SName<>"admin" Or Spass<>"admin" then
  Response.Write "对不起,用户名和密码不正确!<a href='JavaScript:history.go(-1);'>返回</a>"
Response.End
End If
'如果用户名和密码都为:admin,则跳转到4-4c.asp页面
Response.Redirect "http://localhost/2/jianli.htm"  
 %>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?