<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title></title>
<link rel="stylesheet" href="/css/main.css">
<script>
function delete_memo() {
if (confirm("삭제하시겠습니까?")) {
location.href = "/delete/" + document.form1.id.value;
}
}
</script>
</head>
<body>
<form name="form1" method="post" action="/update">
<input type="hidden" name="id" th:value="${memo.id}">
제목:
<input type="text" id="title" name="title" th:value="${memo.title}" required>
<br>
내용: <br>
<textarea id="content" name="content" rows="8" cols="80" th:text="${memo.content}" required></textarea>
<br>
<button type="submit">수정</button>
<button type="button" onclick="delete_memo()">삭제</button>
<button type="button" onclick="location.href='/'">목록</button>
</form>
</body>
</html>