-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSignup.html
More file actions
88 lines (81 loc) · 2.71 KB
/
Signup.html
File metadata and controls
88 lines (81 loc) · 2.71 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Sign Up - JOSE FASHIONS</title>
<link rel="stylesheet" href="style.css">
<style>
body {
font-family: Arial, sans-serif;
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
background-color: #f8f9fa;
}
.signup-container {
width: 300px;
padding: 20px;
border: 1px solid #ddd;
border-radius: 5px;
background: white;
}
h2 {
text-align: center;
}
input[type="text"], input[type="password"], input[type="email"] {
width: 100%;
padding: 10px;
margin: 10px 0;
border: 1px solid #ddd;
border-radius: 5px;
}
button {
width: 100%;
padding: 10px;
background-color: #28a745;
color: white;
border: none;
cursor: pointer;
border-radius: 5px;
}
button:hover {
background-color: #218838;
}
.message {
color: red;
text-align: center;
}
</style>
</head>
<body>
<div class="signup-container">
<h2>Sign Up</h2>
<form id="signup-form">
<input type="text" id="username" placeholder="Username" required>
<input type="email" id="email" placeholder="Email" required>
<input type="password" id="password" placeholder="Password" required>
<button type="submit">Sign Up</button>
<div class="message" id="message"></div>
</form>
</div>
<script>
document.getElementById('signup-form').addEventListener('submit', function(event) {
event.preventDefault(); // Prevent form submission
const username = document.getElementById('username').value;
const email = document.getElementById('email').value;
const password = document.getElementById('password').value;
// Simple validation
if (username === '' || email === '' || password === '') {
document.getElementById('message').innerText = 'Please fill in all fields.';
return;
}
// Here you would typically send the data to the server for processing
// For demonstration, we'll assume a successful signup
alert('Signup successful!'); // Replace with actual signup logic
// Redirect or perform any action after successful signup
});
</script>
</body>
</html>