?? userlogin.asp
字號:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>圖書館管理系統</title>
<link href="css.css" rel="stylesheet" type="text/css" />
<style type="text/css">
<!--
.style1 {font-size: 16px}
-->
</style>
<script Language="JavaScript" Type="text/javascript"><!--
function FrontPage_Form1_Validator(theForm)
{
if (theForm.user.value == "")
{
alert("請在 用戶名 域中輸入值。");
theForm.user.focus();
return (false);
}
if (theForm.user.value.length < 1)
{
alert("在 用戶名 域中,請至少輸入 1 個字符。");
theForm.user.focus();
return (false);
}
if (theForm.user.value.length > 20)
{
alert("在 用戶名 域中,請最多輸入 20 個字符。");
theForm.user.focus();
return (false);
}
if (theForm.pass.value == "")
{
alert("請在 密碼 域中輸入值。");
theForm.pass.focus();
return (false);
}
if (theForm.pass.value.length > 20)
{
alert("在 密碼 域中,請最多輸入 20 個字符。");
theForm.pass.focus();
return (false);
}
if (theForm.yzm.value == "")
{
alert("請在 驗證碼 域中輸入值。");
theForm.yzm.focus();
return (false);
}
if (theForm.yzm.value.length < 5)
{
alert("在 驗證碼 域中,請至少輸入 5 個字符。");
theForm.yzm.focus();
return (false);
}
if (theForm.yzm.value.length > 5)
{
alert("在 驗證碼 域中,請最多輸入 5 個字符。");
theForm.yzm.focus();
return (false);
}
var checkOK = "0123456789-";
var checkStr = theForm.yzm.value;
var allValid = true;
var validGroups = true;
var decPoints = 0;
var allNum = "";
for (i = 0; i < checkStr.length; i++)
{
ch = checkStr.charAt(i);
for (j = 0; j < checkOK.length; j++)
if (ch == checkOK.charAt(j))
break;
if (j == checkOK.length)
{
allValid = false;
break;
}
allNum += ch;
}
if (!allValid)
{
alert("在 驗證碼 域中,只能輸入 數字 字符。");
theForm.yzm.focus();
return (false);
}
return (true);
}
//--></script>
</head>
<body>
<form name="form1" method="post" action="ChkLogin.asp" onSubmit="return FrontPage_Form1_Validator(this);" >
<center>
<table width="800" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="150"><!--#include file="top.asp"--></td>
</tr>
<tr>
<td align="center" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0" class="tb">
<tr>
<td height="260" align="center" valign="middle"><table width="500" border="0" cellspacing="0" cellpadding="3">
<tr align="center" valign="middle" >
<td height="30" colspan="2"><%
if request("id")="0" then response.write "請填寫完整!"
if request("id")="1" then response.write "用戶名或密碼錯誤!"
if request("id")="3" then response.write "驗證碼錯誤"
if request("id")="8" then response.write "網絡超時,或未登錄。請重新登錄!"
if request("id")="9" then response.write "正常退出后臺管理系統"
if request("id")="4" then response.write "該賬號正在審核中..."
if request("id")="5" then response.write "該賬號已被鎖定!"
if request("id")="6" then response.write "該賬號處于掛失狀態..."
%></td>
</tr>
<tr align="center" valign="middle" >
<td height="30" align="right"><img src="img/aa.gif" width="64" height="64"></td>
<td height="30" align="left"><span class="style1"> 用戶登陸</span></td>
</tr>
<tr>
<td width="177" height="25" align="right">用戶名:</td>
<td width="311" height="25" align="left"><input name="user" type="text" id="user" size="20"></td>
</tr>
<tr>
<td height="25" align="right">密碼:</td>
<td height="25" align="left"><input name="pass" type="text" id="pass" size="20"></td>
</tr>
<tr>
<td height="25" align="right">驗證碼:</td>
<td height="25" align="left"><input name="yzm" type="text" id="yzm" size="5" maxlength="5">
<%
Randomize
an=""
an= int((99999-11111+1) * RND +11111)
session("yzm")=an
Response.Write an
%></td>
</tr>
<tr align="center" valign="middle">
<td height="40" colspan="2"><input type="submit" name="Submit" value=" 登 陸 ">
<input type="reset" name="Submit2" value=" 重 置 "></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
<tr>
<td height="60"><!--#include file="bottom.asp"--></td>
</tr>
</table>
</center>
</form>
</body>
</html>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -