实现登陆失败则出现提示

实现登陆失败则出现提示

<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<% request.setCharacterEncoding("UTF-8"); %>
DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>学生登陆页面title>
<script src="https://code.jquery.com/jquery-3.3.1.min.js">script>
<script> 
			$(function(){
			var $my_msg = $("#my_msg");
			$my_msg.hide();
			if('${msg}'=='false'){
				$my_msg.show();
			}
	});
script>
head>
<body>
 	<form action="http://localhost:8080/WangQiang_Test5/loginServlet_WangQiang" method="post">
 		<table align=center>
		<tr>
			<th>欢迎登陆th>
			<th id="my_msg" colspan="3" style="text-align: center;color: red">用户名或密码错误!th>
		tr>
		<tr>
			<td>用户名:td>
			<td><input type="text" name="username">td>
		tr>
		<tr>
			<td>密码:td>
			<td><input type="password" name="password">td>
		tr>
		<tr>
			<td><input type="reset" value="重置">td>
			<td><input type="submit" value="登陆">td>
		tr>
	table>
 	form>
body>
html>

你可能感兴趣的:(学习记录,JavaWeb,java,html,java)