-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcontact.html
65 lines (58 loc) · 2.14 KB
/
contact.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="en">
<head>
<meta charset="UTF-8">
<title>Contact Us - School SMP</title>
<link rel="stylesheet" href="style.css">
<link rel="icon" href="favicon.ico" type="image/x-icon">
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/@emailjs/browser@4/dist/email.min.js"></script>
<script type="text/javascript">
(function() {
// Initialize EmailJS with your public key
emailjs.init("hd8S9bU0sbH_YUHr9");
})();
window.onload = function() {
document.getElementById('contactForm').addEventListener('submit', function(event) {
event.preventDefault();
// Send form data to EmailJS
emailjs.sendForm('service_fz6fy1i', 'template_zphhw0y', this)
.then(function(response) {
alert('Email sent successfully!');
}, function(error) {
alert('Email failed to send. Please try again later.');
});
});
};
</script>
</head>
<body>
<nav>
<ul>
<li><a href="index.html">Home</a></li>
<li><a href="about.html">About SMP</a></li>
<li><a href="rules.html">Rules</a></li>
<li><a href="downloads.html">Downloads</a></li>
<li><a href="contact.html">Contact</a></li>
<li><a href="login.html">Login</a> / <a href="signup.html">Signup</a></li>
</ul>
</nav>
<main>
<h1>Contact Us</h1>
<form id="contactForm">
<label for="name">Your Name</label>
<input type="text" name="name" id="name" placeholder="Your Name" required><br>
<label for="email">Your Email</label>
<input type="email" name="email" id="email" placeholder="Your Email" required><br>
<label for="title">Subject</label>
<input type="text" name="title" id="title" placeholder="Subject" required><br>
<label for="message">Your Message</label>
<textarea name="message" id="message" placeholder="Your Message" required></textarea><br>
<button type="submit">Send</button>
</form>
</main>
<footer>
<p>© 2025 School SMP. All rights reserved.</p>
<p>Powered by School SMP</p>
</footer>
</body>
</html>