-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
83 lines (78 loc) · 2.84 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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Multi-Step Registration Form</title>
<link rel="stylesheet" href="styles.css" />
</head>
<body>
<div class="container">
<form id="Form1">
<h3>Create Free Account</h3>
<input type="text" placeholder="Email" required />
<input type="password" placeholder="Password" required />
<input type="password" placeholder="Confirm Password" required />
<div class="btn-box">
<button type="button" id="Next1">Next</button>
</div>
</form>
<form id="Form2">
<h3>Social Links</h3>
<input type="text" placeholder="GitHub" />
<input type="text" placeholder="Twitter" />
<input type="text" placeholder="LinkedIn" />
<div class="btn-box">
<button type="button" id="Back1">Back</button>
<button type="button" id="Next2">Next</button>
</div>
</form>
<form id="Form3">
<h3>Personal Information</h3>
<input type="text" placeholder="First Name" required />
<input type="text" placeholder="Last Name" required />
<input type="text" placeholder="Mobile Number" required />
<div class="btn-box">
<button type="button" id="Back2">Back</button>
<button type="submit">Submit</button>
</div>
</form>
<div class="step-row">
<div id="progress"></div>
<div class="step-col"><small>Step 1</small></div>
<div class="step-col"><small>Step 2</small></div>
<div class="step-col"><small>Step 3</small></div>
</div>
</div>
<script>
var Form1 = document.getElementById("Form1");
var Form2 = document.getElementById("Form2");
var Form3 = document.getElementById("Form3");
var Next1 = document.getElementById("Next1");
var Next2 = document.getElementById("Next2");
var Back1 = document.getElementById("Back1");
var Back2 = document.getElementById("Back2");
var progress = document.getElementById("progress");
Next1.onclick = function () {
Form1.style.left = "-450px";
Form2.style.left = "40px";
progress.style.width = "240px";
};
Back1.onclick = function () {
Form1.style.left = "40px";
Form2.style.left = "450px";
progress.style.width = "120px";
};
Next2.onclick = function () {
Form2.style.left = "-450px";
Form3.style.left = "40px";
progress.style.width = "360px";
};
Back2.onclick = function () {
Form2.style.left = "40px";
Form3.style.left = "450px";
progress.style.width = "240px";
};
</script>
</body>
</html>