带鼎的名字霸气点的:ASP的网站后台登录管理程序怎么写(简单的就可以)?

来源:百度文库 编辑:高校问答 时间:2024/05/08 20:12:08
我设置了session对象限制管理页面登陆,可是我自己也登陆不上去,怎么回事呢.

<LINK href="../images/bodystyle.css" rel=stylesheet type=text/css>
<SCRIPT language=JavaScript>
<!--
function CheckForm()
{
if (document.UserLogin.Name.value =="")
{
alert("请填写您的用户名!");
document.UserLogin.Name.focus();
return false;
}
var filter=/^\s*[.A-Za-z0-9_-]{5,15}\s*$/;
if (!filter.test(document.UserLogin.name.value)) {
alert("用户名填写不正确,请重新填写!可使用的字符为(A-Z a-z 0-9 _ - .)长度不小于5个字符,不超过15个字符,注意不要使用空格。");
document.UserLogin.Name.focus();
document.UserLogin.Name.select();
return false;
}
if (document.UserLogin.Pwd.value =="")
{
alert("请填写您的密码!");
document.UserLogin.Pwd.focus();
return false;
}
var filter=/^\s*[.A-Za-z0-9_-]{5,15}\s*$/;
if (!filter.test(document.UserLogin.Pwd.value)) {
alert("密码填写不正确,请重新填写!可使用的字符为(A-Z a-z 0-9 _ - .)长度不小于5个字符,不超过15个字符,注意不要使用空格。");
document.UserLogin.Pwd.focus();
document.UserLogin.Pwd.select();
return false;

}
if (document.Login.CheckCode.value==""){
alert ("请输入您的验证码!");
document.Login.CheckCode.focus();
return(false);
}
loginForm.submit();
return true;
}

function CheckBrowser()
{
var app=navigator.appName;
var verStr=navigator.appVersion;
if (app.indexOf('Netscape') != -1) {
alert(" 你使用的是Netscape浏览器,可能会导致无法使用后台的部分功能。建议您使用 IE6.0 或以上版本。");
}
else if (app.indexOf('Microsoft') != -1) {
if (verStr.indexOf("MSIE 3.0")!=-1 || verStr.indexOf("MSIE 4.0") != -1 || verStr.indexOf("MSIE 5.0") != -1 || verStr.indexOf("MSIE 5.1") != -1)
alert(" 您的浏览器版本太低,可能会导致无法使用后台的部分功能。建议您使用 IE6.0 或以上版本。");
}
}
//-->
</script>

限制登陆级别就OK拉