-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathscript.js
More file actions
24 lines (19 loc) · 888 Bytes
/
script.js
File metadata and controls
24 lines (19 loc) · 888 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
document.addEventListener('DOMContentLoaded', function() {
const contactForm = document.getElementById('contact-form');
contactForm.addEventListener('submit', function(e) {
e.preventDefault();
const name = document.getElementById('name').value;
const email = document.getElementById('email').value;
const message = document.getElementById('message').value;
// Here you would typically send the form data to a server
// For this example, we'll just log it to the console
console.log('Form submitted:');
console.log('Name:', name);
console.log('Email:', email);
console.log('Message:', message);
// Clear the form
contactForm.reset();
// Show a success message (you can customize this)
alert('Thank you for your message! We\'ll get back to you soon.');
});
});