注册登录校检(空值,重复密码校检)
来源:互联网 发布:Windows VPN 编辑:程序博客网 时间:2024/06/06 03:02
注册登录校检
<!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=utf-8" />
<title>注册</title>
<script language="javascript">
//javascript check函数,用于检查表单中输入的用户昵称和登录密码是否为空
function check()
{
if(document.frm.userName.value=='')
{
alert("您的账号不能为空!");
document.frm.userName.focus();
return false;
}
else if(document.frm.userPassword.value=='')
{
alert("您的登录密码不能为空");
document.frm.userPassword.focus();
return false;
}
else if(document.frm.userPassword.value!=document.frm.userPassword1.value)
{
alert("对不起,您的两次密码不一致");
document.frm.yanzheng.focus();
return false;
}
else if(document.frm.email.value=='')
{
alert("对不起,您的邮箱不能为空");
document.frm.yanzheng.focus();
return false;
}
else if(document.frm.qq.value=='')
{
alert("对不起,您的qq不能为空");
document.frm.yanzheng.focus();
return false;
}
else{
return true;
}
}
</script>
</script>
</head>
<body>
<h1>注册</h1>
<div class="banner">
<form action="#" method="post" name="frm" onclick="return check();">
<input type="text" value="用户名" maxlength="100" name="userName" >
<br />
<input type="password" value="输入密码" maxlength="100" name="userPassword" >
<br />
<input type="password" value="重复密码" maxlength="100"
name="userPassword1" >
<br />
<input type="text" value="邮箱" maxlength="100" name="email" >
<br />
<input type="text" value="QQ" maxlength="100" name="qq" >
<br />
<input type="submit" value="提交">
</form>
</body>
</html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>注册</title>
<script language="javascript">
//javascript check函数,用于检查表单中输入的用户昵称和登录密码是否为空
function check()
{
if(document.frm.userName.value=='')
{
alert("您的账号不能为空!");
document.frm.userName.focus();
return false;
}
else if(document.frm.userPassword.value=='')
{
alert("您的登录密码不能为空");
document.frm.userPassword.focus();
return false;
}
else if(document.frm.userPassword.value!=document.frm.userPassword1.value)
{
alert("对不起,您的两次密码不一致");
document.frm.yanzheng.focus();
return false;
}
else if(document.frm.email.value=='')
{
alert("对不起,您的邮箱不能为空");
document.frm.yanzheng.focus();
return false;
}
else if(document.frm.qq.value=='')
{
alert("对不起,您的qq不能为空");
document.frm.yanzheng.focus();
return false;
}
else{
return true;
}
}
</script>
</script>
</head>
<body>
<h1>注册</h1>
<div class="banner">
<form action="#" method="post" name="frm" onclick="return check();">
<input type="text" value="用户名" maxlength="100" name="userName" >
<br />
<input type="password" value="输入密码" maxlength="100" name="userPassword" >
<br />
<input type="password" value="重复密码" maxlength="100"
name="userPassword1" >
<br />
<input type="text" value="邮箱" maxlength="100" name="email" >
<br />
<input type="text" value="QQ" maxlength="100" name="qq" >
<br />
<input type="submit" value="提交">
</form>
</body>
</html>
阅读全文
0 0
- 注册登录校检(空值,重复密码校检)
- 注册时重复密码验证和登录为空处理
- 使用sharedPreferences实现密码登录和注册用户名重复检查
- phpmyadmin空密码登录
- mysql空密码登录
- phpmyadmin出现空密码登录被禁止 (参见 允许空密码)的解决办法(转)
- windows空密码无法直接登录
- 设置phpmyadmin密码登录为空
- phpmyadmin出现空密码登录被禁止
- phpmyadmin出现空密码登录被禁止
- 如何让phpmyadmin支持空密码登录
- 登录注册密文传输密码
- 登录或注册时密码的加密
- 使用手机号登录、注册、重置密码
- Android实践 -- 登录+找回密码+注册
- 登录注册判断密码再次输入
- 登录注册系统,前端密码安全解决方案
- 在登录界面,点击注册,注册成功后,把结果(用户名,密码)回传给登录界面,用来设置控件
- js面向对象组件开发框架
- 对草绘建模曲面膨胀算法的理解
- 网络编程基础一
- 你应该知道的AssetBundle管理机制
- 如何使一个div的宽和高占整个屏幕
- 注册登录校检(空值,重复密码校检)
- 微信小程序之装逼失败篇
- future模式
- 揭开AssetBundle庐山真面目(一)
- NSBundle(工程目录)与沙盒路径的不同
- 1006. 生理周期
- crond与crontab调研
- win8, win10中的swapfile.sys-1
- 安卓生成、显示二维码APP代码实现