-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcontact-page.html
88 lines (88 loc) · 3.82 KB
/
contact-page.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
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>Contact Form</title>
<style>
body { font-family: Arial, sans-serif; background-color: #f4f4f4; }
.container { max-width: 600px; margin: 50px auto; padding: 20px; background: #fff; border-radius: 8px; box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); }
.form-group { margin-bottom: 15px; }
.form-group label { display: block; margin-bottom: 5px; }
.form-group input, .form-group textarea { width: 100%; padding: 10px; box-sizing: border-box; }
.form-group textarea { resize: vertical; }
.btn { background-color: #5cb85c; color: #fff; padding: 10px 20px; border: none; border-radius: 5px; cursor: pointer; }
.btn:hover { background-color: #4cae4c; }
header, footer { text-align: center; padding: 10px 0; background: #333; color: #fff; }
footer a { color: #fff; margin: 0 10px; text-decoration: none; }
footer p { margin: 5px 0; }
</style>
</head>
<body>
<header>
<h1>MJ AHMAD</h1>
</header>
<div class="container">
<h2>Contact Us</h2>
<form id="contactForm" action="success.html" method="post" onsubmit="submitForm(event)">
<div class="form-group">
<label for="name">Name:</label>
<input type="text" id="name" name="name" required>
</div>
<div class="form-group">
<label for="email">Email:</label>
<input type="email" id="email" name="email" required>
</div>
<div class="form-group">
<label for="number">Number:</label>
<input type="text" id="number" name="number" required>
</div>
<div class="form-group">
<label for="details">Details:</label>
<textarea id="details" name="details" rows="5" required></textarea>
</div>
<button type="submit" class="btn">Submit</button>
</form>
</div>
<footer>
<p>Address: Purana Paltan, Dhaka-1000, Bangladesh</p>
<p>
<a href="https://www.facebook.com/mj.ahmad.768732" target="_blank">Facebook</a>
<a href="#" target="_blank">Twitter</a>
<a href="https://linkedin.com/in/jafor-ahmad/" target="_blank">Linkedin</a>
<a href="https://github.com/MJ-AHMAD/" target="_blank">GitHub</a>
</p>
<p>Email: [email protected]</p>
<p>Mobile: +880 132 2371643</p>
<p>.</p>
</footer>
<footer>
<p>© 2025 MJ AHMAD. All rights reserved.</p>
<p>
<a href="https://mjahmad.com/" target="_blank">Home</a>
<a href="https://mjahmad.com/terms" target="_blank">Terms</a>
<a href="https://mjahmad.com/privacy" target="_blank">Privacy</a>
<a href="https://mjahmad.com/support" target="_blank">Support</a>
</p>
</footer>
<script>
function submitForm(event) {
event.preventDefault();
const formData = {
name: document.getElementById('name').value,
email: document.getElementById('email').value,
number: document.getElementById('number').value,
details: document.getElementById('details').value
};
// Retrieve existing data from localStorage
let existingData = JSON.parse(localStorage.getItem('formDataList')) || [];
// Append new form data
existingData.push(formData);
// Save updated data back to localStorage
localStorage.setItem('formDataList', JSON.stringify(existingData));
// Redirect to success page
window.location.href = 'success.html';
}
</script>
</body>
</html>