-
Notifications
You must be signed in to change notification settings - Fork 0
/
login.html
47 lines (43 loc) · 1.39 KB
/
login.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>登入頁面</title>
<link rel="stylesheet" type="text/css" href="css/login.css" />
<script type="text/javascript">
function login() {
var username = document.getElementById("username");
var pass = document.getElementById("password");
if (username.value == "") {
alert("Please keyin ac");
} else if (pass.value == "") {
alert("Please keyin pw");
} else if (username.value == "admin" && pass.value == "000000") {
alert("Welcome");
setTimeout("", 3000);
window.location.href = "test.html"
} else {
alert("Wrong AC or PW")
}
}
function enterKeyDown() {
if (event.keyCode == 13) {
login();
}
}
</script>
</head>
<body>
<div id="login_frame">
<p id="image_logo"><img src="monika.png" width="255" height="300"></p>
<form method="post" action="login.js">
<p><label class="label_input">username</label><input type="text" id="username" class="text_field" onkeypress="enterKeyDown()" /></p>
<p><label class="label_input">password</label><input type="text" id="password" class="text_field" onkeypress="enterKeyDown()" /></p>
<div id="login_control">
<input type="button" id="btn_login" value="login" onclick="login();" />
<a id="forget_pwd" href="forget_pwd.html">forgot pw?</a>
</div>
</form>
</div>
</body>
</html>