window.onresize=window.onload=function(){
var h;
var w;
if(!!(window.attachEvent && !window.opera)){
h = document.documentElement.body.height();
w = document.documentElement.body.width();
}else{
h = window.innerHeight;
w = window.innerWidth;
}
var bgImg=document.getElementById("bg");
bgImg.width=w;
bgImg.height=h;
var margintop,marginleft
var clockleft,clocktop;
margintop=(h-300)/2;
marginleft=(w-200)/2;
document.getElementById("main").style.marginLeft=marginleft+"px";
document.getElementById("main").style.top=margintop+"px";
change();
var inputs=document.getElementsByTagName("input");
for (var i = 0; i < inputs.length; i++) {
inputs[i].onclick=function(){
f1(this);
}
};
function f1(e){e.style.borderColor="rgba(38,59,6,0.5)";}
}
function change(){
var length=4;
var code="";
var array=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 < length; i++)
{
var charNum = Math.floor(Math.random() * 36);
code += array[charNum];
}
document.getElementById("yanzheng").innerHTML=code;
}
function click1(){
change();
}
function submit(){
var content1=document.getElementById("username").value;
var content2=document.getElementById("password").value;
var content3=document.getElementById("captcha").value;
var content4=document.getElementById("yanzheng").value;
if(content1==""){
document.getElementById("username").style.borderColor="grey";
};
if(content2==""){
document.getElementById("password").style.borderColor="grey";
};
if( (content3=="") || (content3 != content4)){
document.getElementById("captcha").style.borderColor="grey";
};
}
function signup2(){
var content1=document.getElementById("username").value;
var content2=document.getElementById("password").value;
var content3=document.getElementById("password2").value;
if(content1==""){
document.getElementById("username").style.borderColor="grey";
};
if(content2==""){
document.getElementById("password").style.borderColor="grey";
};
if( (content3=="") || (content3 != content2)){
document.getElementById("password2").style.borderColor="red";
document.getElementById("password").style.borderColor="red";
};
}
function signin2(){
document.getElementById("signin").style.display="block";
document.getElementById("captcha").style.display="block";
document.getElementById("captcha1").style.display="block";
document.getElementById("password2").style.display="none";
document.getElementById("signup").style.display="none";
}
function signup(){
document.getElementById("signin").style.display="none";
document.getElementById("captcha").style.display="none";
document.getElementById("captcha1").style.display="none";
document.getElementById("password2").style.display="block";
document.getElementById("signup").style.display="block";
}
js.rar_登陆界面 js
版权申诉
200 浏览量
2022-09-24
21:03:34
上传
评论
收藏 1KB RAR 举报
我虽横行却不霸道
- 粉丝: 74
- 资源: 1万+
最新资源
- WWY1234567890
- WWY123456789
- Python爬虫示例之distribute-crawler-master.zip
- Python爬虫示例之CnkiSpider-master.zip
- Python爬虫示例之bilibili-user-master.zip
- 某些TP-LINK路由器登录密码加密方式研究,找所有密码集合
- Python爬虫示例之BaiduyunSpider-master.zip
- 国网青海省电力公司-基于泛在电力物联网全过程基建管理“智慧工地”建设成果汇报(201910)(PPT格式).rar
- python爬虫示例之baidu-music-spider-master.zip
- 基于SpringBoot+MySQL+SSM+Vue.js的鲜花销售系统
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈