login.ejs
1.11 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>logined</title>
</head>
<body>
<h1>Hi <%= user.name %></h1>
<form method="post">
NickName:<br>
<input type="text" name="nickname" value="MickeyMouse"><br>
Age:<br>
<input type="text" name="age" value="19"><br><br>
<input type="radio" id="male" name="gender" value="male">
<label for="male">Male</label><br>
<input type="radio" id="female" name="gender" value="female">
<label for="female">Female</label><br>
<input type="submit" value="Submit">
</form>
<a href="/logout" onclick="signOut();">Sign Out</a>
<%if (message=='same nickname'){%>
<script type="text/javascript">
alert("입력하신 NICKNAME은 사용하지 못합니다." +
"다른 NICKNAME을 입력하여 주세요");
</script>
<%}%>
</body>
<script>
function signOut() {
var auth2 = gapi.auth2.getAuthInstance();
auth2.signOut().then(function () {
console.log('User signed out.');
});
}
</script>
</html>