-
2021-02-03 08:59:44
js登录界面代码自用
var btn = document.getElementById(“a4”);
var usne = document.getElementById(“username”);
var psw = document.getElementById(“password”);
var usneTips1 = document.getElementById(“username-tips1”);
var usneTips2 = document.getElementById(“username-tips2”);
var pswTips = document.getElementById(“password-tips”);
var secTips = document.getElementById(“success-tips”);
btn.onclick = function () {
var usneValue = usne.value;
var pasValue = psw.value;
if(usneValue == “”&& pasValue==""){
noneAll();pswTips.style.display=“inline”;
usneTips2.style.display=“inline”;}else if(usneValue != “”&& pasValue==""){
noneAll();
pswTips.style.display=“inline”;
}else if(usneValue == “”&& pasValue!=""){
noneAll();
usneTips2.style.display=“inline”;}else if(usneValue != “”&& pasValue!=""){
noneAll();
if(usneValue.length==11||checkEmil(usneValue)==true){
noneAll();
secTips.style.display=“block”;
window.setTimeout(“https://www.yuque.com/dashboard”,2000);}else{
usneTips1.style.display=“inline”;
usneTips1.style.color=“red”;}
}};
function noneAll() {
pswTips.style.display=“none”;
usneTips2.style.display=“none”;
usneTips1.style.display=“none”;
}
function checkEmil(emil) {var reg = new RegExp("1+([._\-][a-z0-9])@([a-z0-9]+[-a-z0-9]*[a-z0-9]+.){1,63}[a-z0-9]+$"); //正则表达式
var obj = emil;
if(!reg.test(obj)){ //正则验证不通过,格式不对
console.log(“fff”);
return false;
}else{
console.log(“ttt”);
return true;
}
}
a-z0-9 ↩︎
更多相关内容 -
HTML5登录页面特效代码
2021-03-20 02:18:31HTML5登录页面是一款采用电子邮件跟密码的网站登录页面代码下载。 -
登录页面代码
2022-03-22 22:30:47<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title></title> </head> <body> 用户名:<input id="username" name="username" />...inpu...<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title></title>
</head>
<body>
用户名:<input id="username" name="username" /><br>
密码:<input id="pwd" name="pwd" />
<input type="button" οnclick="zhuCei()" value="登录" />
<script type="text/javascript">
var myname=["lili","zhangsan"];
var mypwd=["123122","123231"];
//用户注册成功才会到的页面
// http://127.0.0.1:8020/toutiao/login.html?username=Lilili&pwd=qqqqqq
var url=window.location.href;
var arr=url.split("?");//[http://127.0.0.1:8020/toutiao/login.html,username=Lilili&pwd=qqqqqq]
var acc=arr[1].split("&");// [username=lilil,pwd=qqqq]
var dbb=acc[0].split("=");// [username,lililili]
myname.push(dbb[1]);
//将用户名密码存储到数组中
var pwd=acc[1].split("="); //[pwd,qqqq]
mypwd.push(pwd[1]);
//用户点击登录的时候,触发点击事件,方法登录方法,
function zhuCei(){
//用户输入用户名和密码进行登录,
//在方法中获取用户输入的内容
var zhanHao=document.getElementById("username").value;
var pwds=document.getElementById('pwd').value;
var index=-1;
//循环用户名数组,查看数组中是否存储用户输入的内容,如果存在,则记下他的下标
for(var i=0;i<myname.length;i++){
if(myname[i]==zhanHao){
index=i;
break;
}
}
//根据下标获取密码,比较用户输入的密码和数组中的密码,如果一致则登录成功,不一致则失败
if(index==-1){
alert('用户名或者密码错误,登录失败')
}else{
if(mypwd[index]==pwds){
alert("登录成功!")
}else{
alert("登录失败")
}
}
console.log(myname)
console.log(mypwd)
}
</script>
</body>
</html> -
Java Web 登录页面的实现代码实例
2020-08-26 05:08:02主要介绍了Java Web 登录页面的实现,文中通过示例代码介绍的非常详细,对大家的学习或者工作具有一定的参考学习价值,需要的朋友们下面随着小编来一起学习学习吧 -
C#用户登录界面代码
2018-12-27 22:41:22用C#写的一个简单的用户登录界面,初学者可以下载,高手请忽略。 -
简单登录页面代码
2021-06-29 17:07:50<!... <... <head>...静态页面登录测试</title> <script language="javascript"> window.onload = function() { createCode() } var code; //在全局定义验证码 function createC...<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>静态页面登录测试</title>
<script language="javascript">
window.onload = function() {
createCode()
}
var code; //在全局定义验证码
function createCode() {
code = "";
var codeLength = 4; //验证码的长度
var checkCode = document.getElementById("code");
var random = new Array(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R',
'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'); //随机数
for(var i = 0; i < codeLength; i++) { //循环操作
var index = Math.floor(Math.random() * 36); //取得随机数的索引(0~35)
code += random[index]; //根据索引取得随机数加到code上
}
checkCode.value = code; //把code值赋给验证码
}
//校验验证码
function validateLogin(){
var sUserName = document.frmLogin.username.value ;
var sPassword = document.frmLogin.password.value ;
var inputCode = document.frmLogin.text_code.value;
/*var sinputCode =document.frmLogin.inputcode.value ; */
if ((sUserName.length <= 0) || (sUserName=="")){
alert("请输入用户名!");
return false ;
}
if ((sPassword.length <= 0) || (sPassword=="")){
alert("请输入密码!");
return false ;
}
if ((inputCode.length<= 0) || (inputCode==NULL)){
alert("请输入验证码!");
return false ;
}
}
</script>
</head>
<body >
<fieldset>
<table background="images\e.jpg " width="933" height="412">
<tr height="170">
<td width="570px"> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td><table>
<form method ="POST" action="http://localhost:8080/test/hello.html?login=%B5%C7%C2%BC" name="frmLogin" >
<tr>
<td><label for="username">用户名:</label></td>
<td><input type="text" name="username" id="username" placeholder="input your name" size="20" maxlength="20" /></td>
<td > </td>
<td> </td>
</tr>
<tr>
<td><label for="password">密 码:</label></td>
<td><input type="password" name="password" id="password" placeholder="input your password" size="20" maxlength="20" ) this.value='';" /></td>
<td> </td>
<td> </td>
</tr>
<tr>
<td><label for="text_code">验证码:</label></td>
<td><input type="text" size="" name="text_code" id="text_code" /></td>
<td><input type="button" id="code" οnclick="createCode()" name=""></td>
</tr>
<tr>
<td><input type="checkbox" name="zlogin" value="1">自动登录</td>
</tr>
</table>
</td>
<tr>
<td> </td>
<td><table>
<tr>
<td><input type="submit" name="login" value="登录" onClick="return validateLogin()"/></td>
<td><input type="reset" name="rs" value="重置"></td>
<td><input type="button" name="button" value="注册" οnclick="window.location.href='https://www.w3school.com.cn/jsref/event_onfocus.asp'"></td>
</tr>
</tr>
</table>
</td>
</table>
</fieldset>
</form>
</body>
</html> -
Visual Studio创建Windows窗体登录界面代码
2017-06-23 10:33:26把文档里的代码复制到Form.vb中,然后创建相关控件即可实现密码登录的功能。 -
登录界面源代码
2021-06-09 16:36:43没有上传原背景图,使用的话需自己更改图片名称 可连接注册界面,和用户照片墙,此文只有登录界面代码,代码存在些许问题,望观看的大佬们多多指教! 登陆 登录 账号 密码 忘记密码? function jumpRe(){ window....拿走请三联,并注明出处!
没有上传原背景图,使用的话需自己更改图片名称
可连接注册界面,和用户照片墙,此文只有登录界面代码,代码存在些许问题,望观看的大佬们多多指教!
<!DOCTYPE html>
<html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>登陆</title>
<style>
* {
margin: 0;
padding: 0;
}
html {
height: 100%;
width: 100%;
overflow: hidden;
margin: 0;
padding: 0;
background: url(w3.jpeg) no-repeat 0px 0px;
background-repeat: no-repeat;
background-size: 100% 100%;
-moz-background-size: 100% 100%;
}
body {
display: flex;
align-items: center;
justify-content: center;
height: 100%;
}
#center {
width:25%;
display: flex;
justify-content: center;
align-items: center;
height: 50%;
background-color: rgba(250, 249, 246, 0.479);
border-radius: 50%;
}
p {
margin-top: 30px;
margin-left: 20px;
color: rgb(51, 59, 59);
}
input {
margin-left: 15px;
border-radius: 5px;
border-style: hidden;
height: 30px;
width: 140px;
background-color: rgba(119, 173, 209, 0.5);
outline: none;
color: #ffffff;
padding-left: 10px;
}
.button {
border-color: cornsilk;
background-color: rgba(100, 149, 237, .7);
color: aliceblue;
border-style: hidden;
border-radius: 5px;
width: 100px;
height: 31px;
font-size: 16px;
}
a{
font-size: 17px;
color:rgb(38, 135, 247);
}
</style>
</head>
<body>
<div id="center">
<form action="">
<h1 style="text-align: center;color:rgba(56, 55, 52, 0.788)">登录</h1><br>
<hr><br>
<p>账号<input type="text" placeholder="请输入邮箱" id="email"/></p>
<p>密码<input type="password" placeholder="密码长度至少为六位" id="passworld"/></p>
<div style="text-align: center;margin-top: 30px;">
<input type="submit" class="button" value="登陆">
<input type="reset" class="button" οnclick="jumpRe()" value="注册"><br><br><br>
<a href="#" id="a" style=text-align:middle;>忘记密码?</a>
</div>
</form>
</div>
<script language="javascript" type="text/javascript">
function jumpRe(){
window.location.href="re.html";
}
document.getElementById("a").onclick = function click(){
window.location.href="re.html";
}
//判断邮箱格式
email.onchange = function(){
var email = this.value;
var reg = /^([a-zA-Z]|[0-9])(\w|\-)+@[a-zA-Z0-9]+\.([a-zA-Z]{2,4})$/;
if(reg.test(email)){
alert("邮箱格式正确");
}else{
alert("邮箱格式不正确");
}
}
//判断密码格式
passworld.onchange = function(){
var passwolrd = this.value;
var reg = /^(?![0-9]+$)(?![a-zA-Z]+$)[0-9A-Za-z]{6,12}$/;
if(reg.test(passworld)){
}else{
alert("密码格式不正确");
}
}
function submit() {
var pwd1 = document.getElementById("passworld").value;
var e = document.getElementById("email").value;
var pwd2=localStorage.getItem("password");
var e2=localStorage.getItem("email");
if(pwd1==pwd2&&e==e2)
window.location.href="照片墙.html";
else
alert("账号或密码不正确");
}
</script>
</body>
</html>
-
PHP登陆页面完整代码
2021-03-23 18:26:13> 返回登陆 }else{ header("Location: ./index.php"); } ?> /* templates/login.tpl */ /* mysql.php */ var $db_username= 'root'; var $db_password= '123'; var $db_database= 'new'; $db =mysql_connect($ db_... -
简单WEB登录页面代码实现
2020-03-03 20:57:40longin.html:登录页面,此处action引用**/**类型的地址,JSP可以用${ pageContext.request.contextPath }/LS <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR... -
java语言图形用户登录界面代码
2021-02-12 22:30:35本文实例为大家分享了java登录界面的具体实现代码,供大家参考,具体内容如下1. Login.javapackage wzb;import java.awt.Color;import java.awt.Font;import java.awt.Graphics;import java.awt.Panel;import java.... -
登录界面代码_登录界面设计代码_vs登录界面代码-Guide信息网
2021-06-13 11:56:02这篇文章就和大家分享一个HTML简单登录界面的代码,有一定的参考价值,感兴趣的朋友可以看看。制作登录页面需要用到很多CSS属性和HTML标签,如有不清楚的同学可以看看我以前的文章,之前都有介绍过,或者访问CSS视频... -
html简单登录页面代码
2018-06-16 10:18:58图片必须是在Imges下的否则显示不出来(复制代码的话把图片换成你的图片就好了) 代码如下 <html> <head> <title>tes -
简单的PHP登录界面代码
2012-12-18 08:23:44一个简单实现php登录的界面,配置好php环境后,运行login.php,随便输入一个用户名和密码,点击登录,就跳转到另一个页面,显示出刚才输入的信息。 -
登陆界面代码
2014-05-29 18:57:30登陆界面代码 -
jsp登陆界面源代码
2021-02-28 17:05:38展开全部1、login.jsp文件...登录62616964757a686964616fe59b9ee7ad9431333366306436页面用户名:密码: type="reset" value="重置" style="background-color:red">2、judge.jsp文件pageEncoding="GB18030"%>... -
Android手机通用登陆界面代码设计
2015-12-17 09:38:46想必大家都知道,一款手机APP必备的登录页面。这是你不错的选择。 -
java登陆界面代码
2014-06-07 19:39:33基于mysql的用java编写的登陆界面窗口 -
jquery后台登录页面背景图片自动轮换登录界面代码.zip
2019-07-11 10:59:36jquery后台登录页面背景图片自动轮换登录界面代码,用jquery来验证表单,背景图片自动轮换这样的一个炫酷的效果,登录页面一般用于网站后台,登录成功进入管理系统,在商城的前端也会用到例如会员的登录。... -
登录界面代码
2017-03-05 21:01:40登录界面代码 -
html 【一个简单的用户登录页面代码】
2021-02-10 11:04:03效果图 用户登录.html -
用java写一个登陆界面代码。
2021-02-12 18:20:27展开全部概述具体框架使用jframe,文本框组件62616964757a686964616fe58685e5aeb931333365656631:JTextField;...标签组件:JLabel;复选框组件:JCheckBox;...登录界面:代码实例import javax.swing.*;import... -
jsp登录页面代码jsp登录页面代码
2010-06-28 11:59:20自己写的登录页面自己写的登录页面自己写的登录页面自己写的登录页面 -
登录界面代码(vs).pdf
2021-10-11 06:46:03登录界面代码(vs).pdf -
html登录,html登录页面代码,HTML
2021-09-10 19:08:53html登录界面代码,代码可以使用,界面还不错,UI设计可以 -
c语言密码登陆界面代码
2017-06-14 21:03:14c语言 -
QQ登录界面实现代码
2020-06-16 00:07:00QQ登录界面实现代码 -
网页登录页面设计代码
2018-07-17 15:01:00网页页面设计<title>Bootstrap响应式登录界面模板</title> <link rel="stylesheet" type="text/css" href="css/bootstrap.min.css" /> <style type="text/css">