Notice
Recent Posts
Recent Comments
Link
«   2024/07   »
1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30 31
Tags
more
Archives
Today
Total
관리 메뉴

WON.dev

remove_page.jsp 본문

JSP/JSP.sideproject

remove_page.jsp

GAWON 2023. 6. 23. 12:48
<%@ 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: 800px;
      margin: auto;
      text-align: center;
   }
   table {
      width: 800px;
      text-align: left;
      border-collapse: collapse;      
   }
   
   td,th {
      border : 1px solid green;
      padding: 10px;   
   }
   
   
   th {
      width: 130px;
      text-align: center;
      background-color: green;
      color: white;
   }
      
   h1 {
      color : green;   
   }
   
</style>
<script type="text/javascript">
   function remove(){
      var oriPw = '${bvo.pw}';
      var ckPw = document.querySelector("#inPw");
      if(oriPw  == ''){
         alert("비밀번호를 입력하세요.");
         f.pw.focus();
         return;
      }
      
      if(oriPw != ckPw.value){
         alert("비밀번호가 다릅니다.");
         return;
      }
      
      if(confirm("게시글을 삭제하시겠습니까?")){
         location.href='/chapter99/BBSController?cmd=remove';
      }
   }
</script>
</head>
<body>
   <div>
      <h1>${bvo.b_idx } 번 게시글 삭제</h1>
      <table>
         <tbody>
            <tr>
               <th>작성자</th>
               <td>${bvo.writer }</td>
            </tr>
            <tr>
               <th>제목</th>
               <td>${bvo.title }</td>
            </tr>
            <tr>
               <th>비밀번호</th>
               <td><input type="password" name="pw" size="80" id="inPw"></td>
            </tr>
            <tr>
               <td colspan="2">
                  <input type="button" value="게시글 삭제" onclick="remove()">
                  <input type="reset" value="다시 작성">
                  <input type="button" value="게시글로 이동" onclick="history.go(-1)">
               </td>
            </tr>
         </tbody>
      </table>      
   </div>
</body>
</html>

'JSP > JSP.sideproject' 카테고리의 다른 글

update.jsp  (0) 2023.06.23
update_page.jsp  (0) 2023.06.23
remove_comment.jsp  (0) 2023.06.23
insert.jsp  (0) 2023.06.23
insert_page.jsp  (0) 2023.06.23