<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>登录</title>
<script>
function dl(){
var usrReal="GDPU";
var pswReal="xg2022";
var usr=document.getElementById("inputa").value;
var psw document.getElementById("inputb").value;
var r=confirm("确定准确无误,登录?");
if(usrReal!=usr){
var r=alert("该用户不存在")
return
}
else if(usr==usrReal && pswl==pswReal){
var r=alert("登录成功")
return
}
else{
var r=alert("登陆失败,账号或密码输入错误")
return
}
}
</script>
</head>
<style>
body{
background-image:url(image1.png) ;
}
.button{
font-size: 16px
}
p.serif{font-family:"Times New Roman",Times,serif;font-size:30px;text-shadow: 5px 5px 5px #BB8800;text-align:left;}
.center{
text-align:center;
table th{
border:1px solid black;
}
</style>
<body style="background-size:100%;background-attachment:fixed;">
<table class="center" width="200" cellspacing="0" >
<div style="margin-top:230px;">
<div class="center" style="padding: 22px;border-radius: 12px;width: 30%;height: 40%;
background-image: linear-gradient(#D0D0D0 ,#8FBC8F );opacity:0.7;margin: 0px auto">
<div class="center" style="margin: 40px;">
<p class="serif"> Welcome</p>
<form>
<p>
账号:<input type="text" id="inputa"></p>
密码:<input type="password" id="inputb"><br>
<p>
<div style="float:left"><button>注册</button></div>
<div style="float:right"><button>找回密码</button></div>
<input type="button" onclick="dl()" value="登录" >
</form>
</table>
</body>
</html>
为啥显示不了登录提示