login.jsp
<%@ page language="java" contentType="text/html; charset=utf-8"
pageEncoding="utf-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Insert title here</title>
</head>
<script type="text/javascript" src="js/jquery-3.3.1.min.js"></script>
<body>
<script type="text/javascript">
$(document).ready(function(){
$("#id").blur(function(){
if($("#id").val()=="" || $("#id").val()==null){
alert("数据不能为空")
}
});
})
</script>
<form action="update1" method="post">
用户登陆
用户名:<input type="text" name="id" id="id" value="${param.id}">
密码: <input type="password" name="upassword" id="upassword">
<input type="submit" value="提交">
<input type="reset" value="重置">
</form>
</body>
</html>