본문 바로가기
study/MVC

[MVC] 18. MVC Model2방식 - 회원가입 (아이디찾기)

by 금이패런츠 2022. 4. 18.
728x90
반응형
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%--src/main/webapp/view/member/idForm.jsp --%> 
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<c:set var="path" value="${pageContext.request.contextPath}" />
      
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>아이디찾기</title>
<link rel="stylesheet"
	href="https://cdn.jsdelivr.net/npm/bootstrap@4.6.1/dist/css/bootstrap.min.css">
</head>
<body>
<div class="container">
<h3>아이디찾기</h3>
<form action="${path}/member/idSearch" method="post">
<div class="form-group">
	<label >EMAIL:</label> <input type="text" class="form-control" name="email">
    <label >전화번호:</label>
                 <input type="password" class="form-control" name="tel">
</div>
<div  style="padding: 3px;text-align: center;">
<button type="submit" class="btn btn-dark">아이디찾기</button>
</div>
</form>
</div>
</body></html>

<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%-- src/main/webapp/view/member/id.jsp--%>
<!DOCTYPE html>
<html><head><meta charset="UTF-8">
<title>id찾기</title>
<link rel="stylesheet"
	href="https://cdn.jsdelivr.net/npm/bootstrap@4.6.1/dist/css/bootstrap.min.css">
	
<script type="text/javascript">
   function idsend(id) {
	   opener.document.loginForm.id.value = id
	   self.close();
   }
</script>
</head><body>
<div class="container" style="vertical-align: middle; height: 100%;">
 <table class="table ">
      <tr>
        <th>ID</th><td>${id}**</td>
      </tr>
      <tr>
        <td colspan="2" style="padding: 3px;text-align: center;">
        <button  class="btn btn-dark" onclick="idsend('${id}')">아이디전송</button>
        </td>
      </tr>
</table></div> 
</body></html>
728x90
반응형