-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscript.js
More file actions
25 lines (21 loc) · 857 Bytes
/
Copy pathscript.js
File metadata and controls
25 lines (21 loc) · 857 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
25
window.addEventListener('load', function() {
const content = document.querySelector('.content');
content.style.opacity = '1';
});
function myFunction() {
document.getElementById("contactForm").submit();
}
document.addEventListener('DOMContentLoaded', function () {
const contactForm = document.getElementById('contactForm');
contactForm.addEventListener('submit', function (event) {
event.preventDefault();
// Add your form submission logic here (e.g., sending data to a server)
// For simplicity, let's just log the form data to the console
const formData = new FormData(contactForm);
for (const [name, value] of formData) {
console.log(`${name}: ${value}`);
}
// Optionally, you can add logic to clear the form fields after submission
contactForm.reset();
});
});