/
index.html
65 lines (56 loc) · 1.6 KB
/
index.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
<!DOCTYPE html>
<html lang="ja">
<head>
<meta charset="UTF-8">
<title>ログイン</title>
<link rel="stylesheet" href="style.css">
</head>
<header>
<center>
<h1>JavaScriptとHTMLで簡単なログインフォームを作る</h1>
</center>
</header>
<style>
header {
position: fixed;
color: white;
width: 100%;
height: 70px;
background-color: #8dc21f;
}
</style>
<br>
<br>
<br>
<body>
<div>
<!--フォーム-->
<form name="login_form">
<center>
<h1 class="contact-title">ログイン</h1>
<p>ID, Passwordご入力の上, 「認証」ボタンをクリックしてください.</p>
</center>
<div>
<center>
<div>
<input type="id" name="id" placeholder="ID">
</div>
<br>
<div>
<input type="password" name="pass" placeholder="Password" onchange="nextPage()">
</div>
</center>
</div>
<button type="button" onClick="nextPage();">認証</button>
</form>
<!--ログイン処理-->
<script language="JavaScript" type="text/javascript">
function nextPage() {
id = document.login_form.id.value
pwd = document.login_form.pass.value;
location.href = id + pwd + ".html";
}
</script>
</div>
</body>
</html>