-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patheditaprophile.html
125 lines (103 loc) · 3.41 KB
/
editaprophile.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
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
<!DOCTYPE html>
<html lang="ko">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>프로필 수정</title>
<script src="scripts/disable_right_click.js"></script>
</head>
<body oncontextmenu="return disableRightClick();">
<h1>함봉선도서관</h1>
<form>
<label title="Email"><input type="text" id="email" value="이메일"></label><br>
<p>✻</p>
<label title="Username"><input type="text" id="username" value="아이디"></label><br>
<p>✻</p>
<label title="Password"><input type="password" id="password" value="비밀번호"></label><br>
<label title="Confirm password"><input type="password" id="confirmpassword" value="비밀번호"></label><br>
<button type="submit" onclick="return save()">업데이트를 하다</button>
</form>
<div class="footer">
<div id="col-0"><li>© All rights reserved</li></div>
</div>
<style>
@media only screen and (min-width: 400px) {
body {
background-color: blueviolet;
}
button {
border: solid;
border-radius: 20px;
border-style: inset;
margin-left: 126px;
margin-top: 3px;
}
form {
margin-top: 200px;
margin-bottom: 5px;
margin-right: 30px;
margin-left: 680px;
}
h1 {
color: white;
text-align: center;
margin-top: 100px;
}
input {
border: solid;
border-radius: 20px;
border-style: inset;
margin-top: 3px;
}
p {
color: white;
margin-left: 80px;
}
.footer {
position: fixed;
left: 0;
bottom: 0;
width: 100%;
background-color: black;
}
#col-0 li {
list-style-type: none;
margin-right: 20px;
float: right;
color: white;
text-align: left;
text-decoration: none;
}
}
</style>
<script>
function save(){
var username = document.getElementById("username").value;
var password = document.getElementById("password").value;
var confirmpassword = document.getElementById("confirmpassword").value;
var email = document.getElementById("email").value;
if(username.length < 6 || password.length < 6){
alert("최소 6자 이상의 사용자 이름과 비밀번호를 입력해 주세요");
return null
}
if(email=='이메일' || email==''){
alert("필요한 모든 정보를 입력합니다")
return null
}
if(password != confirmpassword) {
alert ("비밀번호가 일치하지 않습니다, 다시 시도해 주세요...")
return null
}
if(username.length >=6 || password.length >=6){
alert("성공적인 등록")
}
var user = {
"email": email, "username": username, "password": password
}
localStorage.setItem("user", JSON.stringify(user));
window.location = "booktable.html";
return false;
}
</script>
</body>
</html>