本帖最后由 青出于蓝 于 2021-8-4 08:45 编辑 <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<style>
.css1{
width: 70px;
height: 70px;
left: 1px;
position: absolute;
}
.css{
width: 70px;
height: 70px;
left: 18px;
position: absolute;
}
.css2,.css3{
left: 80px;
position: absolute;
}
body{
font-family: '黑体','宋体','微软雅黑';
}
.div3{
width: 500px;
height: 500px;
background-color: aquamarine;
left: 350px;
top: 75px;
position: absolute;
}
.abc{
left: 420px;
position: absolute;
}
.sure{
color: #5bfcff;
background-color: blueviolet;
width: 200px;
height: 55px;
left: 150px;
position: absolute;
font-family: '黑体', '宋体';
font-size: 30px;
}
.sure2{
color: #5bfcff;
background-color: green;
width: 100px;
height: 50px;
left: 30px;
position: absolute;
font-family: '黑体', '宋体';
font-size: 30px;
}
</style>
</head>
<body>
<script type="text/javascript">
function check() {
var statue =document.getElementById("bbb");
if(document.getElementById("username").value=="") {
alert("没有输入用户名!");
return false;
} else if(document.getElementById("password").value=="") {
alert("没有输入密码!");
}//else if (statue.checked) {
//alert("请确认")
//return false;}
else if (document.getElementById("username").value=="鱼c"&&document.getElementById("password").value=="66666666"&& statue.checked){
alert("登录成功!")
window.open("https://fishc.com.cn")
return true;
}else {
alert("用户名或密码错误或没有确认")
return false
}
}
// 登录
</script>
<div class="div3">
<big align style="color: red;font-size: 60px" class="abc">
登录系统
</big>
<label><div class="css1">用户名:</div><div class="css3"><input type="text" id="username" name="1"></div></label><br/><br><br><br>
<label ><div class="css" >密码:</div>
<div class="css2"><input type="password" id="password" maxlength="10" name="2"></diV><br><br></label>
<label><input type="radio"value="bbb" id="bbb">请确认(检查密码用户名)</label>
<br><br><br><br><br>
<input type="submit" onclick="check()" value="登录" class="sure">
<input type="reset" name="1" value="重置" class="sure2">
</div>
</body>
</html>
自己写的,用户名:鱼c。密码:66666666. |