728x90

 

 

게시판 리스트 조회 페이지인 보드리스트뷰

제이쿼리 css() 안에 백그라운드나 컬러 등 안에 쓰는 코드가 좀 많이 헷갈렸음

몇번 썼다 지우고 해봤는데 더 연습이 필요할 듯함

페이징 처리는 따로 많이 연습해야겠다

 

<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncodoing="UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title> prac </title>
<style type="text/css">
	#tb{margin: auto; width: 700px; border-collapse: collapse;}
	#tb tr td{ paddign: 5px;}
	#buttonTab{ border-left:hidden; border-right:hidden;}
</style>

</head>
<body>

	<c:import url="../common/menubar.jsp"/>

	<h1 align="center">게시글 목록</h1>
	
	<h3 align="center">총 게시글 갯수 : ${ pi.listCount }</h3>
	
	<table border="1" id="tb">
		<!-- 제목 tr -->
		<tr style="backgroud:yellowgreen;">
			<th>번호</th>
			<th width="300">제목</th>
			<th>작성자</th>
			<th>날짜</th>
			<th>조회수</th>
			<th>첨부파일</th>
		</tr>
	
		<!-- 내용 tr -->
		<c:forEach var="b" items="${ list }">
		<tr class="contentTr">
			<td align="center">${ b.boardId }</td>
			<td align="left">${ b.boardTitle }</td>
			<td align="center">${ b.nickName }</td>
			<td align="center">${ b.boardCreateDate }</td>
			<td align="center">${ b.boardCount }</td>
			<td align="center">
			<td align="left">
				<c:if test="${!empty b.originalFileName }">
					◎
				</c:if>
			</td>
		</tr>
		</c:forEach>
			
		<!-- 글쓰기 버튼 tr  -->
		<tr>
			<td>
				<c:if test="${ !empty loginUser }">
					&nbsp; &nbsp; &&nbsp; <!-- &nbsp; : 공백을 표시하기 위한 특수문자 -->
					<button onclick="location.href='binsertView.bo';">글쓰기</button>
				</c:if>	
			</td>
		</tr>
		
		<!-- 페이징 처리 -->
		
	</table>
	
	<script>
	// 테이블 중에서 find 후손을 찾겠다. 마우스가 들어가있으면 그 tb에서 하나위로 올라가고(tr까지) tr에 대해서 백그라운드를 변경 
		$('.contentTr').find("td").mouseenter(function(){
			$(this).parent().css({'background':'rgba(0, 100, 0, 0.5)', 'color': 'white', 'cursor': 'pointer' });
		}).mouseout(function(){
			$(this).parent().css({'background':'none', 'color':'black'});
		}).click(function(){
			var bId = $(this).parent().children('td').eq(0).text();
			location.href = 'bdetail.bo?bId=' + bId + "&page=" + ${ pi.currentPage};
		})
	</script>


</body>
</html>
728x90
반응형
728x90

 

 

div 자체를 불러오고 있어서 아래 찍히는게 엘레멘트 요소랑

div태그 전체가 브라우저 콘솔에 찍힘

밸류값인 텍스트를 받아오려면 어떻게 해야할까?

    <h3>class로 접근하기</h3>
    <p> getElementsByClassName() : 반환타입 [] HTMLCollection<br>
        해당 클래스에 속한 요소를 모두 선택함.
    </p>
    <div id="testClass1" class="area">getElementsByClassName()</div>
    <button onclick="testByClass();">html태그 접근 - class 접근 - getElementsByClassName()</button>
    <script>
        function testByClass(){
            var test = document.getElementsByClassName("area");
            console.log(test);
            console.log(typeof test);

            for(var i=0; i< test.length;i++){
                test[i].style.borderStyle = 'dashed';
            }
        }
    </script>

 

userName에 .value를 추가해서 밸류값만 가져오게 해야

전체 객체를 안가져오고 텍스트인 밸류값만 divEx1 변수에 넣어주게 되서 텍스트가 출력된다!

if(userName != null){
     divEx1.innerHTML = userName.value;
     console.log(divEx1);
}else{

 

 

 

 

728x90
반응형
728x90

 

<c:url>로 var변수를 만들고, value에 해당 url을 넣고

이 var 변수를 다른 button type="button"에서 onclick으로 불러내기

기존 버튼 온클릭에서 url 직접 입력에서 다른 코드로 한번 더 해봄

 

<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
    

<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>

<link rel="stylesheet" type="text/css" href="${ pageContext.servletContext.contextPath }/resources/css/member-style.css"> 

<style>
	#myInfoTable td{text-align:center;}
</style>

</head>
<body>

	<c:import url="..common/menubar.jsp"/>
	
	<h1 align="center">'${ loginUser.name }'님의 정보 보기</h1>
	
	<div class="centerText">
		<table id="myInfoTable">
			<tr>
				<th>아이디</th>
				<td>${loginUser.id }</td>
			</tr>
			<tr>
				<th>이름</th>
				<td>${loginUser.name }</td>
			</tr>
			<tr>
				<th>닉네임</th>
				<td>${loginUser.nickName }</td>
			</tr>
			<tr>
				<th>성별</th>
				<c:if test="${loginUser.gender eq 'M' }">
					<td> 남성 </td>
				</c:if>
				<c:if test="${loginUser.gender eq  'F'}">
					<td> 여성 </td>
				</c:if>
			</tr>
			<tr>
				<th>나이</th>
				<td>${loginUser.age }</td>
			</tr>
			<tr>
				<th>이메일</th>
				<td>${ loginUser.email }</td>
			</tr>
			<tr>
				<th>전화번호</th>
				<td>${loginUser.phone }</td>
			</tr>
			<tr>
				<th>주소</th>
				<td>
					<c:forTokens var="ft" items="${loginUser.address }" delims="/" varStatus="vs">
						<c:if test="${vs.index eq 0 && ft >= '0' && ft <= '99999' }">
							(${ft })
						</c:if>
						<c:if test="${vs.index eq 0 && !(ft >= '0' && ft <= '99999')}">
							${ft }
						</c:if>
						<c:if test="${vs.index eq 1 }">
							${ft }
						</c:if>
						<c:if test="${vs.index eq 2 }">
							${ft }
						</c:if>
					</c:forTokens>
					
				</td>
			</tr>
			
			<tr>
				<td colspan="2"	align="center">
					<c:url var="mpwdUpdateView" value="mpwdUpdateView.me"/>
					<button type="button" onclick="${mpwdUpdateView}">비밀번호 수정</button>
					<button type="button" onclick="location.href='mupdateView.me'">정보수정</button>
					<c:url var="mdelete" value="mdelete.me"/>
					<button type="button" onclick="location.href='${ mdelete }'">회원탈퇴</button>
					<button type="button" onclick="home.do">시작페이지로</button>
				</td>
			</tr>
		</table>
	</div>




</body>
</html>
728x90
반응형
728x90

 

반복 반복

머리에 기억되도록 반복

<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">

<title> practice </title>
<link rel="stylesheet" type="text/css" href="${pageContext.servletContext.contextPath }/resources/css/member-style.css">

</head>
<body>

	<c:import url="../common/menubar.jsp"/>
	
	<h1 align="center">${loginUser.name }님의 정보 수정</h1>
	
	<div class="centerText">
		<form action="mupdate.me" method="post">
			<table>
				<tr>
					<th>아이디</th>
					<td>${loginUser.id }<input type="hidden" name="id" value="${loginUser.id }"></td>
				</tr>
				<tr>
					<th>이름</th>
					<td><input type="text" name="name" value="${loginUser.name }"></td>
				</tr>
				<tr>
					<th>닉네임</th>
					<td><input type="text" name="nickName" value="${loginUser.nickName }"></td>
				</tr>
				<tr>
					<th>성별</th>
					<c:if test="${ loginUser.gender == 'M' }">
						<td>
							<input type="radio" name="gender" value="M" checked>남
							<input type="radio" name="gender" value="F">여
						</td>
					</c:if>
					<c:if test="${ loginUser.gender == 'F' }">
						<td>
							<input type="radio" name="gender" value="M">남
							<input type="radio" name="gender" value="F" checked>여
						</td>
					</c:if>
				</tr>
				<tr>
					<th>나이</th>
					<td><input type="number" name="age" value="${loginUser.age }" min="18" max="100"></td>
				</tr>
				<tr>
					<th>이메일</th>
					<td><input type="email" name="email" value="${loginUser.email }"></td>
				</tr>
				<tr>
					<th>전화번호</th>
					<td><input type="tel" name="phone" value="${ loginUser.phone }"></td>
				</tr>
				
				
				<c:forTokens var="ft" items="${ loginUser.address }" delims="/" varStatus="vs">
					<c:if test="${ vs.index eq 0 && ft >= '0' && ft <= '99999' }">
						<c:set var="post" value="${ ft }"/>
					</c:if>
					<c:if test="${ vs.index eq 0 && !(ft >= '0' && ft <= '99999') }">
						<c:set var="address1" value="${ ft }"/>
					</c:if>
					<c:if test="${ vs.index eq 1 }">
						<c:set var="address1" value="${ ft }"/>
					</c:if>
					<c:if test="${ vs.index eq 2 }">
						<c:set var="address2" value="${ ft }"/>
					</c:if>			
				</c:forTokens>
				
				<tr>
					<th>우편번호</th>
					<td>
						<input type="text" name="post" class="postcodify_postcode5" value="${ post }" size="6">
						<button type="button" id="postcodify_search_button">검색</button>
					</td>
				</tr>
				<tr>
					<th>도로명 주소</th>
					<td>
						<input type="text" name="address1" class="postcodify_address" value="${address1 }" size="30">
					</td>
				</tr>
				<tr>
					<th>상세 주소</th>
					<td>
						<input type="text" name="address2" class="postcodify_extra_info" value="${ address2 }" size="30">
					</td>
				</tr>
				
				
				<!-- jQuery와 Postcodify를 로딩한다. -->
				<script src="//d1p7wdleee1q2z.cloudfront.net/post/search.min.js"></script>
				<script>
					// 검색 단추를 누르면 팝업 레이어가 열리도록 설정한다.
					$(function(){
						$("#postcodify_search_butto").postcodifyPopUp();
					});
				</script>
				
				<tr>
					<td colspan="2" align="center">
						<input type="submit" value="수정하기">
						<c:url var="mdelete" value="${ loginUser.id }">
							<c:param name="id" value="${ loginUser.id}"/>
						</c:url>
						<button type="button" onclick="location.href='${ mdelete }'">탈퇴하기</button>
						<button type="button" onclick="location.href='home.do'">시작 페이지로</button>
					</td>
				</tr>
				
			</table>
		</form>
	</div>



</body>
</html>
728x90
반응형
728x90

 

내정보 수정페이지

 

<c:forTokens> 구분자

 

<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>

<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">

<title>prac</title>

<link rel="stylesheet" type="text/css" 
href="${ pageContext.servletContext.contextPath }/resources/css/member-style.css">


</head>
<body>

	<c:import url="../common/menubar.jsp"/>
	
	<h1 align="center">${ loginUser.name }님의 정보 수정</h1>
	
	<div class="centerText">
		<form action="mupdate.me" method="post">
			<table>
				<tr>
					<th>아이디</th>
					<td>${loginUser.id }
					<input type="hidden" name="id" value="${loginUser.id }">
					</td>
				</tr>
				<tr>
					<th>이름</th>
					<td>
						<input type="text" name="name" value="${ loginUser.name }"></td> <!-- input text박스 안에 value값이 들어가있는 상태가 됨 -->
					</td>
				</tr>
				<tr>
					<th>닉네임</th>
					<td><input type="text" name="nickName" value="${loginUser.nickName }"></td>
				</tr>
				<tr>
					<th>성별</th>
					<c:if test="${loginUser.gender == 'M' }">
						<td>
							<input type="radio" name="gender" value="M" checked readonly>남
							<input type="radio" name="gender" value="F" readonly>여
						</td>
					</c:if>
					<c:if test="${loginUser.gender == 'F' }">
						<td>
							<input type="radio" name="gender" value="M" readonly>남
							<input type="radio" name="gender" value="F" checked readonly>여
						</td>
					</c:if>
				</tr>
				<tr>
					<th>나이</th>
					<td><input type="number" min="20" max="100" name="age" value="${ loginUser.age }"></td>
					<!-- input 타입넘버도 value로 안에 값을 넣어서 보여줄 수 있음 -->	
				</tr>
				<tr>
					<th>이메일</th>
					<td><input type="email" name="email" value="${loginUser.email }"></td>
				</tr>
				<tr>
					<th>전화번호</th>
					<td><input type="tel" name="phone" value="${loginUser.phone }"></td>
				</tr>
				
				
				<c:forTokens var="addr" items="${loginUser.address }" delims="/" varStatus="vs">
					<c:if test="${ status.index eq 0 && addr >= '0' && addr <= '99999' }">
						<c:set var="post" value="${ addr }"/>
					</c:if>
					<c:if test="${ status.index eq 0 && !(addr >= '0' && addr <= '99999') }">
						<c:set var="address1" value="${ addr }"/>
					</c:if>
					<c:if test="${ status.index eq 1 }">
						<c:set var="address1" value="${ addr }"/>
					</c:if>
					<c:if test="${ status.index eq 2 }">
						<c:set var="address2" value="${ addr }"/>
					</c:if>
				</c:forTokens>
				
				
				<tr>
					<th>우편번호</th>
					<td>
						<input type="text" name="post" class="postcodify_postcode5" value="${ post }" size="6">
						<button type="button" id="postcodify_search_button">검색</button>
					</td>	
				</tr>
				<tr>
					<th>도로명 주소</th>
					<td><input type="text" name="address1" class="postcodify_address" value="${ address1 }" size="30"></td>
				</tr>
				<tr>
					<th>상세주소</th>
					<td><input type="text" name="address2" class="postcodify_extra_info" value="${ address2 }" size="30"></td>
				</tr>
				
				
				<!-- jQuery와 Postcodify를 로딩한다. -->
				<script src="//d1p7wdleee1q2z.cloudfront.net/post/search.min.js"></script>
				<script>
					// 검색 단추를 누르면 팝업 레이어가 열리도록 설정한다.
					$(function(){
						$("#postcodify_search_button").postcodifyPopUp();
					});	
				</script>
					
				<tr>
					<td colspan="2" align="center">
						<input type="submit" value="수정하기"> <!-- value값이 버튼이 되서 나옴 -->
						<c:url var="mdelete" value="mdelete.me">
							<c:param name="id" value="${ loginUser.id }"/>
						</c:url>	
						<button type="button" onclick="location.href='${mdelete}'">탈퇴하기</button>
						<button type="button" onclick="location.href='home.do'">시작 페이지로</button>
					</td>
				</tr>
			</table>		
		</form>
	</div>


</body>
</html>
728x90
반응형
728x90

 

 

jQuery ajax 

아이디 중복 유효성 검사

<%@ page language="java" contentType="text/html; charset=UTF-8"
		pageEncoding="UTF-8"%>
		
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">

<title>prac</title>



</head>
<body>

	<jsp:include page="../common/menubar.jsp"/>
	
	<h1 align="center">회원가입</h1>
	
	<div class="centerText">
		<form action="minsert.me" method="post" id="joinForm">
			<table>
				<tr>
					<th>* 아이디</th>
					<td>
						<input type="text" name="id" id="userId">
						<span class="guide ok"> 사용 가능 아이디</span>
						<span class="guide error"> 사용 불가능 아이디</span>
						<input type="hidden" id="idDuplicateCheck" value="0"/>
					</td>
				</tr>
				<tr>
					<th>* 이름</th>
					<td><input type="text" name="name"></td>
				</tr>
				<tr>
					<th>* 비밀번호</th>
					<td><input type="password" name="pwd"></td>
				</tr>
				<tr>
					<th>* 비밀번호 확인</th>
					<td><input type="password" name="pwd2"></td>
				</tr>
				<tr>
					<th>닉네임</th>
					<td><input type="text" name="nickName"></td>
				</tr>
				<tr>
					<th>성별</th>
					<td>
						<input type="radio" name="gender" value="M">남
						<input type="radio" name="gender" value="F">여
					</td>
				</tr>
				<tr>
					<th>나이</th>
					<td><input type="number" name="age" min="20" max="100"></td>
				</tr>
				<tr>
					<th>이메일</th>
					<td><input type="email" name="email"></td>
				</tr>
				<tr>
					<th>전화번호</th>
					<td><input type="tel" name="phone"></td>
				</tr>
				<tr>
					<th>우편번호</th>
					<td>
						<input type="text" name="post" class="postcodify_postcode5" value="" size="6">
						<button type="button" id="postcodify_search_button">검색</button>
					</td>
				</tr>
				<tr>
					<th>도로명 주소</th>
					<td><input type="text" name="address1" class="postcodify_address" value=""></td>
				</tr>
				<tr>
					<th>상세 주소</th>
					<td><input type="text" name="address2" class="postcodify_extra_info" value=""></td>
				</tr>
				
				<!-- jQuery와 Postcodify를 로딩을 위한 스크립트 -->
				<script src="//d1p7wdleee1q2z.cloudfront.net/post/search.min.js"></script>
				<script>
				// 검색 단추를 누르면 팝업 레이어가 열리도록 설정함
					$(function(){
						$("#postcodify_search_button").postcodifyPopUp();
					});
				</script>
				
				<tr>
					<td colspan="2" align="center">
						<button onclick="return validate();">가입하기</button>
						<input type="reset" value="취소하기"> <!-- 인풋 리셋은 name속성 필요없이 value에 텍스트나타나게 -->
						<button type="button" onclick="location.href='home.do'">시작 페이지로</button>
					</td>
				</tr>
			</table>
		</form>
	</div>




	<script>
		${'#userId'}.on('keyUp',function(){
			var userId = $(this).val().trim(); /* trim() : 앞뒤 공백제거 */
			
			if(userId.length > 4){ // 변수명.length
				$('.guide').hide();
				$('#idDuplicateCheck').val(0);
				return;
			}
			
			$.ajax({
				url:'dupId.me',
				date:{id:userId},
				success:function(data){
					console.log(date);
					
					if(data == 1){
						$('guide.error').show();
						$('guide.ok').hide();
						$('#idDuplicateCheck').val(0);
					}else{
						$('.guide.error').hide();
						$('.guide.ok').show();
						$('#idDuplicateCheck').val(1);
					}
				},
				error:function(data){
					console.log(date);		
				}
				
			});
		});
	
		function validate(){
			if($('#idDuplicateCheck').val() == 0){ // 유효성 검사로 중복아이디면 밸류값이 0
				alert('사용 가능한 아이디를 입력해주세요');
				$('#userId').focus(); // 아이디 입력하고 입력창으로 포인터 이동시키는 .focus()
				return false;
			}else{
				${'#joinForm'}.submit(); // .submit() : 폼태그 submit시키는 코드
			}
		}
		
	</script>


</body>
</html>

 

728x90
반응형
728x90

 

 

코딩 자체가 별다른 에너지가 들지 않게 계속 써서 익숙해지기

전체 구조파악하고 세부적인 코드 써보기 & 반복

머리 아프거나 하기 싫을 때 이렇게만 해도 집중이 되고,

코딩을 손에 놓지 않고 계속 실력 향상을 할 수 있다!

짜투리 시간에 하기도 좋음. 3-40분정도 걸린 듯

 

<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>    
    
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>

<script
  src="https://code.jquery.com/jquery-3.6.0.min.js"
  integrity="sha256-/xUj+3OJU5yExlq6GSYGSHk7tPXikynS7ogEvDej/m4="
  crossorigin="anonymous"></script>
  

<style>
	.nav{margin-left:auto; margin-right:auto; text-align:center;}
	.menu{
		disply:inline-block; background:$e4fc41; text-align:center;
		line-height:50px; width:150px; height:50px; border-radius:20px;
		margin-left:5%; margin-right:5%;
	}
	.menu:hover{background:#b0c903; font-weight:bolder; cursor:pointer;}
	a:link{color:black; text-decoration:none;}
	a:visited{color:black; text-decoration:none;}
	
</style>

</head>
<body>

	<!-- 메뉴바는 어느 페이지든 포함하고 있을 테니 여기서 contextPath 변수 값 만들기 -->
	<c:set var="contextPath" value="${pageContext.servletContext.contextPath }" scope="application"/>
	
	<h1 align="center">Let's do it!!</h1>
	<br>
	
	<div class="loginArea" align="right">
		<c:if test="${ empty sessionScope.loginUser }"> <!-- user가 로그인 안했으면 로그인하게 id,pw 보여주는 창 보여줌-->
			<form action="login.me" method="post">
				<table id="loginTable" style="text-align:center;">
					<tr>
						<td>아이디</td>
						<td><input type="text" name="id"></td>
						<td rowspan="2">
							<button id="loginBtn">로그인</button>
						</td>
					</tr>
					<tr>
						<td>비밀번호</td>
						<td><input type="password" name="pwd"></td>
					</tr>
					<tr>
						<td colspan="3">
							<button type="button" onclick="location.href='enrollView.me'">회원가입</button>
							<button type="button">아이디/비밀번호 찾기</button>
						</td>
					</tr>
				</table>
			</form>
		</c:if>
		
		<c:if test="${ !empty sessionScope.loginUser }"> <!-- user가 로그인했으면 정보 변경, 로그아웃 등 보여줌 -->
			<h3 align="right"> <!-- h3태그 안에 c core와 button태그를 넣은게 신기 -->
				<c:out value="${loginUser.name }님 환영합니다."/>
				<c:url var="myinfo" value="myinfo.me"/>
				<c:url var="logout" value="logout.me"/>
				<button onclick="location.href='${myinfo}'">정보보기</button> 
				<button onclick="location.href='${logout}'">로그아웃</button>	
								<!-- c:url에서 var변수로 지정한 것을 버튼클릭하면 이동하게만듬 -->		
			</h3>
		</c:if>
		
		<!-- 위처럼 c:url을 통해서 지정할 수도 있지만 지금까지 해왔던 것처럼 바로 href에 url을 넣어도 상관없음 -->
		<div class="menubar">
			<div class="nav">
				<div class="menu"><a href="home.do">Home</a></div>
				<div class="menu"><a href="blist.bo">게시판</a></div>
			</div>
		</div>
	</div>


</body>
</html>
728x90
반응형
728x90

 

EL+JSTL

백단과 연결되서 받을 수 있게 코드

기존 배우던 코드를 쭉 편하게 따라치면서 구조 분석하고 대강 틀만보고 안보고 치면서 세부코드 치는 연습

그리고 코딩 자체가 많이 익숙해지고 에너지 소모가 덜 되서 자연스러울 수 있게 하기 위한 목적으로 

머리 안돌아갈 때마다 쭉 따라치면서 가볍게 많이 쳐야겠다


<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>

<link rel="stylesheet" type="text/css" href="${ pageContext.servletContext.contextPath }"/resources/css/member-style.css">

<style>
    #myInfoTable td{text-align: center;}
</style>

</head>
<body>

<c:import url="../common/menubar.jsp"/>

<h1 align="center">${loginUser.name }님의 정보 보기</h1>

<div class="centerText">>
    <table border="" id="myInfoTable">
        <tr>
            <th>아이디</th>
            <td>${loginUser.id }</td>		
        </tr>
        <tr>
            <th>이름</th>
            <td>${loginUser.name</td>
        </tr>
        <tr>
            <th>닉네임</th>
            <td>${loginUser.nickName}</td>
        </tr>
        <tr>
            <th>성별</th>
            <c:if test="${loginUser.gender eq 'M'}">
                <td>남성</td>
            </c:if>
            <c:if test="${loginUser.gender eq 'F'}">
                <td>여성</td>
            </c:if>    
        </tr>
        <tr>
            <th>나이</th>
            <td>${loginUser.age}</td>
        </tr>
        <tr>
            <th>이메일</th>
            <td>${ loginUser.email}</td>
        </tr>
        <tr>
            <th>전화번호</th>
            <td>${loginUser.phone}</td>
        </tr>
        <tr>
            <th>주소</th>
            <td>
                <c:forTokens var="addr" items="${loginUser.address}" delims="/" varStatus="status">
                    <c:if test="${status.index eq 0 && addr >= '0' && addr <= '99999'">
                        (${ addr})
                    </c:if>
                    <c:if test="${status.index eq 0 && !(addr >= '0' && addr <= '99999'">
                        ${addr}
                    </c:if>
                    <c:if test="${status.index eq 1">
                        ${addr}
                    </c:if>
                    <c:if test="${status.index eq 2">
                        ${addr}
                    </c:if>
                </c:forTokens>
            </td>
        </tr>

        <tr>
            <td colspan="2" aling="center">
                <button type="button" onclick="location.href='mpwdUpdateView.me'">비밀번호 수정</button>
                <button type="button" onclick="location.href='mupdateView.me'">정보 수정</button>
                <button type="button" onclick="location.href='${m.delete}'">회원탈퇴</button>
                <button type="button" onclick="location.href='home.do'">시작 페이지로</button>
            </td>
        </tr>

    </table>
</div>






</body>
</html>
728x90
반응형
728x90

 

<!DOCTYPE html>
<html lang="ko">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
<title> EVERYDAY</title>

<link rel="stylesheet" type="text/css" href="notice1.css?after">


</head>
<body>


    <form action="notice.bo" method="post">
        <fieldset>
            <table border="">
                <th>공지사항</th>
                <tr>
                    <td>번호</td>
                    <td>제목</td>
                    <td>작성자</td>
                    <td>작성일</td>
                    <td>조회</td>
                </tr>    
                <tr>
                    <td>1</td>
                    <td>마켓컬리 배송 안내</td>
                    <td>마켓컬리</td>
                    <td>22.07.13</td>
                    <td>50</td>
                </tr>
                <tr>
                    <td>2</td>
                    <td>마켓컬리 배송 안내</td>
                    <td>마켓컬리</td>
                    <td>22.07.13</td>
                    <td>55</td>
                </tr>
            </table>
        </fieldset>
    </form>


</body>
</html>
728x90
반응형
728x90

[GitBash] 브랜치 생성, 변경, 통합 등 이모저모

 

체크아웃으로 브랜치 옮겨다니고 

merge 기존에 만들어둔 브랜치를 합치려니까 컨플릭트 뜸

깃허브에서 pull request 했을 때 컨플릭트 뜬 건 resolve해봤는데

깃배쉬에서는 충돌나는 부분이 안떠서 어찌해야할지 구글링 했는데

깃배쉬 관련은 안나오고 전부 git이나 다른 프로그램 사용하는 거만 뜨는 중...

 

 

 

 

 

728x90
반응형

+ Recent posts