Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 48 additions & 1 deletion static/js/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,51 @@ function createCalendar() {
}
}

window.onload = createCalendar;
window.onload = createCalendar;



function handleSignup() {
const name = document.getElementById('newName').value;
if(name === "") {
alert("이름을 입력해주세요!");
} else {
alert(name + "님, 회원가입이 완료되었습니다!");
window.location.href = "login.html";
}
}


function goToSignup() {
window.location.href = "signup.html";
}

function handleSignup() {
const name = document.getElementById('newName').value;
if(name === "") {
alert("이름을 입력해주세요!");
} else {
alert(name + "님, 회원가입이 완료되었습니다!");
window.location.href = "login.html";
}
}

// 로그인창에서 '회원가입' 글자를 눌렀을 때 이동하는 기능 수정
function goToSignup() {
window.location.href = "signup.html";
}

function handleSignup() {
const name = document.getElementById('newName').value;
if(name === "") {
alert("이름을 입력해주세요!");
} else {
alert(name + "님, 회원가입이 완료되었습니다!");
window.location.href = "login.html"; // 가입 성공하면 로그인창으로 이동
}
}

// 로그인창에서 '회원가입' 글자를 눌렀을 때 이동하는 기능 수정
function goToSignup() {
window.location.href = "signup.html";
}
28 changes: 28 additions & 0 deletions templates/signup.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<!DOCTYPE html>
<html lang="ko">
<head>
<meta charset="UTF-8">
<title>회원가입</title>
<link rel="stylesheet" href="../static/css/style.css">
</head>
<body>
<div class="login-container">
<h2 style="margin-bottom: 30px; text-align: center;">회원가입</h2>

<div class="input-group" style="margin-bottom: 20px;">
<input type="text" id="newName" placeholder="이름 입력">
<input type="text" id="newId" placeholder="아이디 입력">
<input type="password" id="newPw" placeholder="비밀번호 입력">
<input type="password" id="confirmPw" placeholder="비밀번호 확인">
</div>

<button class="login-btn" onclick="handleSignup()" style="width: 100%; height: 50px;">가입하기</button>

<div class="footer-links" style="margin-top: 20px;">
<span onclick="history.back()" style="cursor:pointer; color: #666;">뒤로 가기</span>
</div>
</div>

<script src="../static/js/script.js"></script>
</body>
</html>