-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMyDataModify.html
More file actions
139 lines (128 loc) · 4.59 KB
/
MyDataModify.html
File metadata and controls
139 lines (128 loc) · 4.59 KB
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
126
127
128
129
130
131
132
133
134
135
136
137
138
139
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<!-- Always force latest IE rendering engine (even in intranet) & Chrome Frame
Remove this if you use the .htaccess -->
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>Mypage_Update</title>
<meta name="viewport" content="width=device-width; initial-scale=1.0">
<link rel="stylesheet" type="text/css" href="../stylesheets/Additional_Frame.css">
<style type="text/css">
body{
margin: 0;
font-family: '함초롬돋움';
text-align: center;
background: #d9d9d9;
}
form{
width: 50%;
margin: auto;
}
form>span{
float: left;
margin-left: 10px;
margin-bottom: 5px;
font-size: 14px;
font-weight: bold;
}
input{
width: 100%;
padding: 5px;
margin-bottom: 10px;
font-family: '함초롬돋움';
font-size: 14px;
}
input[type="submit"]{
width: auto;
border: 0;
background: #7bb080;
}
.alertmsg{
display: none;
width: 100%;
margin-bottom: 7px;
color: #E62E2E;
font-weight: bold;
}
</style>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script>
// 현재 유저 정보
var prsName;
$.getJSON('/getUserName',function(data){
prsName = data.name;
document.getElementById('upd_name').value = prsName;
});
// 수정 버튼 클릭 시
$(document).on("click", "#upd_btn", function(){
// 입력받은 데이터
var newName = document.getElementById('upd_name').value;
var cmpPw = document.getElementById('compare_pw').value;
var newPw = document.getElementById('upd_pw').value;
var newPwre = document.getElementById('upd_pw_re').value;
$.ajax({
url : '/MyEdit',
dataType : 'json',
type : 'POST',
data : {
'User_Name' : newName,
'User_Pass' : cmpPw,
'New_Pass' : newPw
//프로젝트 내용
},
success : function(result) {
if(result.suc == false){
alert("비밀번호가 일치하지 않습니다!");
} else{
alert(newName + "과 " + newPw + "으로 변경");
}
window.location ="Mypage";
// else {
// alert(newName + "으로 이름 변경");
// }
}
});
// 비밀번호 일치 확인
$(document).on("blur", "#upd_pw_re", function(){
if($('#upd_pw').val() != $('#upd_pw_re').val()){
$('#pw_msg').css('display', 'block');
}
});
$(document).on("focus", "#upd_pw", function(){
$('#pw_msg').css('display', 'none');
});
$(document).on("focus", "#upd_pw_re", function(){
$('#pw_msg').css('display', 'none');
});
});
</script>
</head>
<body>
<div class="sidebar">
<a href="Project" target="cwindow">그루핑</a>
<div id="menu_fix">
<ul id="submenu" class="menu">
<li><a name="info" href="Mypage" target="cwindow"> <span>내 정보</span> </a></li>
<li><a name="community" href="Community"> <span>커뮤니티</span> </a></li>
<li><a name="logout" href="/"> <span>로그아웃</span> </a></li>
</ul>
</div>
</div>
<div id="wrapper">
<h2>개인정보 수정</h2>
<form>
<span>이름</span><br>
<input type="text" id="upd_name"/><br>
<span>현재 비밀번호</span><br>
<input type="password" id="compare_pw"/><br>
<span>새 비밀번호</span><br>
<input type="password" id="upd_pw" placeholder="변경시에만 입력하세요"/><br>
<span>새 비밀번호 확인</span><br>
<input type="password" id="upd_pw_re" placeholder="변경시에만 입력하세요"/><br>
<div id="pw_msg" class="alertmsg">비밀번호가 일치하지 않습니다!</div>
<input type="button" id="upd_btn" value="수정하기">
</form>
</div>
</body>
</html>