JSP/JSP.sideproject
loginPage.jsp
GAWON
2023. 6. 26. 09:18
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
<!-- 로그인 페이지 -->
<style type="text/css">
div{
width: 500px;
margin: auto;
}
h2{
text-align: center;
}
table{
width: 100%;
text-align: left;
border-collapse: collapse;
}
td,th{
border: 1px solid green;
padding: 15px;
}
th{
width: 40%;
background-color: green;
color: #fff;
text-align: center;
}
input[type="text"], input[type="password"]{
height: 20px;
width: 95%;
}
#btn{
text-align: center;
}
</style>
<script type="text/javascript">
var cp = '${currentPage}';
function login(f){
f.action = "../MemController";
f.submit();
}
function view_all(){
location.href='../BBSController?cmd=allList¤tPage=' + cp;
}
</script>
</head>
<body>
<div>
<h2>로그인</h2>
<form method="post">
<table>
<tbody>
<tr>
<th>아이디</th>
<td><input type="text" name="mid"></td>
</tr>
<tr>
<th>비밀번호</th>
<td><input type="password" name="mpw" ></td>
</tr>
<tr>
<td colspan="2" id="btn">
<input type="button" value="로그인" onclick="login(this.form)">
<input type="reset" value="다시 작성">
<input type="button" value="목록으로 이동" onclick="view_all()">
<input type="hidden" name="cmd" value="login">
<input type="hidden" name="currentPage" value="${currentPage }">
</td>
</tr>
</tbody>
</table>
</form>
</div>
</body>
</html>