-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsign_up.html
110 lines (103 loc) · 4.24 KB
/
sign_up.html
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>SIGN_UP</title>
<script src="https://use.fontawesome.com/releases/v5.2.0/js/all.js"></script>
<style>
#main{width: 500px; height: 400px; margin: 0 auto; float: center;}
#main h1{ float: center margin: 50px 0 0 0; padding-bottom: 5px; border-bottom: solid 2px #ffbe10; font-size: 30px; text-align: center; font-weight: bold;}
h1 a[href]{
color: orange;
text-decoration-line: none;
}</style>
<script>
function signUp(){
if(!document.form.id.value){
alert("아이디를 입력하세요.");
document.form.id.focus();
return;
}
if(!document.form.pass.value){
alert("비밀번호를 입력하세요.");
document.form.pass.focus();
return;
}
if(!document.form.pass_confirm.value){
alert("비밀번호 확인은 필수입니다.");
document.form.pass_confirm.focus();
return;
}
if(!document.form.name.value){
alert("이름을 입력하세요.");
document.form.name.focus();
return;
}
if(document.form.pass.value != document.form.pass_confirm.value){
alert("비밀번호가 일치하지 않습니다.\n다시 입력해 주세요.");
document.member_form.pass.focus();
document.member_form.pass.select();
return;
}
document.form.submit();
}
//아이디 중복 검사
function checkId(){
var userid=document.getElementById("id").value;
if(userid)
{
url = "checkId.php?userid="+userid;
window.open(url,"checkid","width=400,height=50,resizable=no,left=500,top=100");
}else{
alert("아이디를 입력하세요");
}
}
</script>
</head>
<body>
<h1 id="b"><a href="main.php"><i class="fas fa-utensils"></i> 모음</a></h1>
<section>
<div id="main">
<div id="join_box">
<form action="sign_up(c).php" method="post" name="form">
<h1>SIGN-UP</h1>
<div class="form id">
<div class="col1">아이디</div>
<div class="col2"><input type="text" id="id" name="id"></div>
<div class="col3">
<input type="button" onclick="checkId()" value="중복확인">
</div>
</div>
<div class="form">
<div class="col1">비밀번호</div>
<div class="col2"><input type="password" name="pass"></div>
</div>
<div class="clear"></div>
<div class="form">
<div class="col1">비밀번호 확인</div>
<div class="col2"><input type="password" name="pass_confirm"></div>
</div>
<div class="clear"></div>
<div class="form">
<div class="col1">이름</div>
<div class="col2"><input type="text" name="name"></div>
</div>
<div class="clear"></div>
<div class="form">
<div class="col1">생년월일</div>
<div class="col2"><input type="date" name="date"></div>
<div class="clear"></div>
<div class="form">
<div class="col1">성별</div>
<input type='radio' name='gender' value='F' />여성
<input type='radio' name='gender' value='M' />남성
</div>
<div id="joinButton">
<input type="button" value="JOIN" onclick="signUp()">
</div>
</form>
</div>
</div>
</section>
</body>
</html>