body{
background: url(img/bg.jpg) 50% no-repeat fixed;
position: relative;
height: 100vh;
width:100vw;
background-size: cover;
}
.form-box{
text-align: center;
margin-top:300px;
}
.form-inner{
background-color: white;
display: inline-block;
padding:30px;
text-align: right;
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1)
}
.input-item,.button-item{
margin-top:20px;
}
input{
font-size:20px;
}
.button-item{
margin-top:20px;
text-align: center;
font-size: 20px;
}
账号:
密码:
动态码:
$(document).ready(function(){
$('#login-btn').click(function(e){
const data = {
username:$('input[name="username"]').val(),
password:$('input[name="password"]').val(),
code:$('input[name="code"]').val(),
}
$.post('./check.php',data).then((result)=>{
console.info('hello',result)
switch(result.code){
case 'success':
alert('登录成功');
break;
case 'error':
alert(result.msg);
}
})
})
})
一键复制
编辑
Web IDE
原始数据
按行查看
历史