on
[Spring]Spring쇼핑몰 프로젝트 - Ajax를 활용하여 상품 문의 리스트...
[Spring]Spring쇼핑몰 프로젝트 - Ajax를 활용하여 상품 문의 리스트...
< table id = "questionTable" border = "1" style = "table-layout:fixed" >
< caption > 문의 < / caption >
< tr >
< th width = "100" > 상품 정보 < / th >
< td style = "border-right: none;" width = "100" >
< img src = "<%=request.getContextPath() %>/resources/images/thumbnailimage/${goodsquestion.gds_thumbnail}" height = "100" width = "100" / >
< / td >
< td style = "border-left: none; white-space:nowrap; overflow: hidden;" width = "500" >
${goodsquestion.gds_name}
< br > < br >
< div style = "text-align: right" > < a href = "goodsupdate?&gds;_num=${goodsquestion.gds_num}" > 상품 수정하기 < / a > < / div >
< / td >
< td width = "100" >
< fmt:formatDate value = "${goodsquestion.gdsqna_date}" pattern = "yyyy-MM-dd HH:mm:ss" / >
< / td >
< / tr >
< tr >
< th width = "100" > 문의 제목 < / th >
< td colspan = "3" > ${goodsquestion.gdsqna_title} < / td >
< / tr >
< tr >
< th width = "100" > 문의 내용 < / th >
< td colspan = "3" >
< c:if test = "${goodsquestion.fname ne null}" >
< img src = "<%=request.getContextPath() %>/resources/upload/goodsqna/${goodsquestion.fname}" / > < br > < br >
< / c:if >
< pre style = "border: none; background: none;" > ${goodsquestion.gdsqna_content} < / pre >
< / td >
< / tr >
< / table >
< c:choose >
< c:when test = "${answer == 1 }" >
< div id = "goodsQnaAnswer${goodsanswer.gdsqna_num}" >
< table border = "1" >
< caption > 답변 < / caption >
< tr >
< th width = "100" > 답변 제목 < / th >
< td > ${goodsanswer.gdsqna_title} < / td >
< th width = "100" > 답변 등록일 < / th >
< td > < fmt:formatDate value = "${goodsanswer.gdsqna_date}" pattern = "yyyy-MM-dd HH:mm:ss" / > < / td >
< / tr >
< tr >
< th > 문의내용 < / th >
< td colspan = "3" > < pre style = "border: none; background: none;" > ${goodsanswer.gdsqna_content} < / pre > < / td >
< / tr >
< tr >
< td colspan = "4" align = "center" >
< input type = "button" onclick = "updategoodsqnaanswer(${goodsanswer.gdsqna_num})" value = "수정" >
< input type = "button" onclick = "location='deletegoodsqnaanswer?gdsqna_num=${goodsanswer.gdsqna_num}'" value = "삭제" >
< / td >
< / tr >
< / table >
< / div >
< / c:when >
< c:when test = "${answer == 0 }" >
< form action = "goodsqnaanswer" method = "post" >
< input type = "hidden" id = "gdsqna_num" name = "gdsqna_num" value = "${goodsquestion.gdsqna_num}" >
< table border = "1" >
< caption > 답변 등록 < / caption >
< tr >
< th width = "100" > 답변 제목 < / th >
< td > < input type = "text" id = "gdsqna_title" name = "gdsqna_title" size = "100" > < / td >
< / tr >
< tr >
< th width = "100" > 문의내용 < / th >
< td > < textarea id = "gdsqna_content" name = "gdsqna_content" cols = "102" rows = "10" > < / textarea > < / td >
< / tr >
< tr >
< td colspan = "2" align = "center" >
< input type = "submit" value = "답변 등록" >
< / td >
< / tr >
< / table >
< / form >
< / c:when >
from http://issaac.tistory.com/13 by ccl(A) rewrite - 2021-12-27 12:27:25