<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>登录</title>
<link href="../static/css/load.css" rel="stylesheet" type="text/css">
<script>
function fnLogin() {
var oUname = document.getElementById("uname")
var oError = document.getElementById("error_box")
var opassward = document.getElementById("upass")
if(oUname.value.length<6){
oError.innerHTML="用户名至少为6位"
}
if(oUname.value.length>6&opassward.value.length<6){
oError.innerHTML="密码至少为6位"
}
}
</script>
</head>
<body>
<div><h1>打开代码的世界</h1></div>
<div class="aa"><script>document.write("loading....")</script>
</div>
<div class="flex-container">
<div class="box">
<p id="we">aaa</p>
<script>
document.getElementById("we").innerHTML=Date();
<!--代替id=we的内容-->
</script>
<div class="input_box">
登录 <input id="uname" type="text" placeholder="write down your name">
</div>
<br>
<div class="input_box">
密码 <input id="upass" type="password" placeholder="write down your PIN">
</div>
<br>
<div id="error_box"><br></div>
<div class="input_box">
<button onclick="fnLogin()">load</button>
<button type="button" onclick=window.alert("账号密码为空,请输入!")>未输入账号密码</button>
</div>
<br>
</div>
</div>
</body>
</html>
<style>
</style>
h1{
align:center;
padding-right: 0;
padding-left: 0;
font-weight: bold;
font-size: 16px;
padding-bottom: 15px;
margin: 0;
color: #904;
padding-top: 0;}
body{
padding-right:500px;
margin-top:100px;
padding-left:500px;
font-size:16px;
background:#000;
padding-bottom:40px;
color:black;
padding-top:40px;
font-family:verdana,Arial,Helvetica,sans-serif;
}
form {
display: block;
margin-top: 0em;}
.flex-container {
display: -webkit-flex;
display: flex;
width: 400px;
height: 250px;
padding-left:100px;
padding-top:40px;
background-color:pink;
aa{
color:pink}
}
input_box{
align:center;
margin:550px;
padding-left:550px;
color:red;
}
body{
padding-right:500px;
margin-top:100px;
padding-left:500px;
font-size:16px;
background:#000;
padding-bottom:40px;
color:red;
padding-top:40px;
font-family:verdana,Arial,Helvetica,sans-serif;
}
<script>
document.write(Welcome to loading.....)
</script>